]> git.maquefel.me Git - brevno-suite/hugo/commit
cache/httpcache: Add respectCacheControlNoStoreInResponse and respectCacheControlNoSt...
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 29 Sep 2025 11:05:24 +0000 (13:05 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 29 Sep 2025 15:06:50 +0000 (17:06 +0200)
commit3e46ba5ce2e382e7b388103427c20c21c11fc839
tree42730a75f70e05d3743a2dbad0d4e2ac2b1922c2
parent4d1303512b6e1d7c2fd89777f30abded914e2279
cache/httpcache: Add respectCacheControlNoStoreInResponse and respectCacheControlNoStoreInRequest options

This cache is used by `resources.GetRemote`.

Default values are:

* respectCacheControlNoStoreInResponse: false
* respectCacheControlNoStoreInRequest: true

This is a slightly breaking change, but the current behaviour is confusing, as:

* Many servers set the `no-store` header without much consideration, see https://developer.chrome.com/docs/web-platform/bfcache-ccns for more context
* We almost always want to cache the `resources.GetRemote` to disk.

Fixes #13990
cache/httpcache/httpcache.go
go.mod
go.sum
resources/resource_factories/create/create.go