cachecontrol
cachecontrol copied to clipboard
Golang HTTP Cache-Control Parser and Interpretation
The `Vary` header can change the cacheability of a response. This library could add some helpers to account for it. A dev would probably want to create a cache key...
Currently the `cacheobject.Reason` type is an `int`. This works well enough for the library itself, but it's a shame that it doesn't log very well. For example, right now if...
Heya, I was wondering if there was some functionality which allows *reversing* the parse process to *generate* a `Cache-Control` string value from a `ResponseCacheDirectives` struct? My usecase is that I...
When passing in a response with just the `Date` header set, the return value is: `reasons`: nil `expires`: time.Time{} (a zero value) `err`: nil I would expect the `reasons` to...
It looks like this package does not support the less common `Surrogate-Control` header sometimes used by CDNs. The logic to support Surrogate-Control would basically the same as Cache-Control, but the...
The code reads: ``` if respHeaders.Get("Expires") != "" { expiresHeader, err = http.ParseTime(respHeaders.Get("Expires")) if err != nil { // sometimes servers will return `Expires: 0` or `Expires: -1` to //...
I've been dealing with some parsing issues as some servers don't conform to HTTP Caching spec. Since the error vars are exported I could I just handle it in my...
Currently only the expiration time is exposed in the API. There are many use cases in which a fuller model of a response should be available, such as responding with...