httpcache
provides an rfc7234 compliant golang http.Handler.
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))
httplog
packageVia
headerIf-Match
and If-None-Match
Content-Location
and request methodRange
requestsTests are currently conducted via the test suite and verified via the CoAdvisor tool.