Open brendanjerwin opened 8 years ago
Hi Brendan, not really: the goal for this library is to cache everything, even requests that the server do not intend to be cached (cf. https://github.com/StalkR/httpcache/blob/master/cache.go#L59 that caches all 200 and 301). It's not meant as a caching mechanism like in browsers. I created it primarily to test libraries fetching pages and parsing them so that tests would only fetch it once, then re-use the same page in following runs of the tests, this way testing only just the parsing code (e.g. https://github.com/StalkR/imdb/blob/master/init_test.go). So I'd recommend creating another library for this, but feel free to fork and evolve this one if you think it's a good basis! Cheers
Would it make sense handle Etags for cache invalidation in the same way a browser might?