Cache-Control: stale-while-revalidate
the-leonat opened this issue · comments
Does souin implement asynchronous background fetching similar to varnish grace
setting?
I could not find anything about it in the docs and it seems to ignore my cache-control response header of my upstream webserver.
public, max-age=120, stale-while-revalidate=3600
.
after the content turns stale souin replies once with:
Cache-Status: Souin; fwd=uri-miss; key={{key}}-/; detail=UNCACHEABLE-STATUS-CODE
server responds with code 304
.
func isCacheableCode(code int) bool {
switch code {
case 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501:
return true
}
return false
}
but 304 is not a cacheable status code by implementation. is this a bug?