7b009bf1fe
refs https://github.com/TryGhost/Toolbox/issues/410 - The 'private' value in 'Cache-Control' response header for all errors made it impossible for shared caches (e.g.: Fastly, Cloudflare) to cache 404 responses efficiently. - The change substitutes 'max-age=0' which should not effect the browser cache behavior but would allow shared caches to process such requests efficiently. - A more loose caching logic only applies to 404 responses from GET requests that are not user-specific (non-authenticated, non-cookie containing requests)
10 lines
439 B
JavaScript
10 lines
439 B
JavaScript
module.exports = {
|
|
public: 'public, max-age=0',
|
|
hour: 'public, max-age=' + 3600,
|
|
day: 'public, max-age=' + 86400,
|
|
year: 'public, max-age=' + 31536000,
|
|
yearImmutable: 'public, max-age=' + 31536000 + ', immutable',
|
|
private: 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0',
|
|
noCache: 'no-cache, max-age=0, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0'
|
|
};
|