The article is very good, I read it all the way to the end and learned quite a few things.
But the title is just a bit misleading, it is more like "test coverage in go, with an example using http cache".
Thanks for writing and sharing.
Serious question: is properly handling the "Not Modified " status code really considered caching or is there a better name? Maybe client-side caching? HTTP caching in my mind is associated with something like varnish.
Conditional GET and not re-downloading the same content are important aspects of caching. They save bandwidth and remove the download part of latency. For small resources, serving the content again instead of 304 will not matter.
Caching is simply keeping a response that hasn't changed so you don't have to recompute it. There can be many levels of cache. Varnish is one useful type of cache, but there are many others too.