lox / httpcache

An RFC7234 compliant golang http.Handler for caching HTTP responses
MIT License
264 stars 28 forks source link

httpcache

httpcache provides an rfc7234 compliant golang http.Handler.

wercker status

GoDoc

Example

This example is from the included CLI, it runs a caching proxy on http://localhost:8080.

proxy := &httputil.ReverseProxy{
    Director: func(r *http.Request) {
    },
}

handler := httpcache.NewHandler(httpcache.NewMemoryCache(), proxy)
handler.Shared = true

log.Printf("proxy listening on http://%s", listen)
log.Fatal(http.ListenAndServe(listen, handler))

Implemented

Todo

Caveats

Testing

Tests are currently conducted via the test suite and verified via the CoAdvisor tool.

Reading List