Reuse response body on Etag, Last-Modified, Expires and Cache-Control.
client := &http.Client{}
c := cache.NewMemoryCacheClient(client)
r, _ := http.NewRequest("GET", <url>, nil)
res, err := c.DoWithCache(r)
more detail example.
## install
go get github.com/satoshun/go-http-cache/cmd/cachestat
## execute
cachestat https://www.google.co.jp/images/nav_logo242.png https://www.google.com/textinputassistant/tia.png
Not Modified - https://www.google.co.jp/images/nav_logo242.png
Use Cache - https://www.google.com/textinputassistant/tia.png