Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static caching expiry key and re-caching #3085

Merged
merged 2 commits into from
Jan 7, 2021

Conversation

jasonvarga
Copy link
Member

This PR fixes two issues:

It'll now use expiry as the config key for defining the expiration length for half measure caching.
We've documented it that way, and it's nicer than the default_cache_length key that v2 used.
But since the v2 key worked if you dug into the code and worked it out yourself, that'll still work
for backwards compatibility. Calling that deprecated.
Closes #2744

Fixed an issue where the page is re-cached even if the cached version was served. This would extend
the expiration date of the cached page, which could make it appear like the page was cached forever.
This fix also combines the 'retrieve' and 'cache' middlewares.

Firstly, it's easier to maintain.
Second, it fixes an issue where the page is re-cached even if the cached version was served.
@jasonvarga jasonvarga force-pushed the fix/static-caching-expiration branch from 54a296b to 32bc395 Compare January 7, 2021 15:45
@jasonvarga jasonvarga merged commit 237e802 into 3.0 Jan 7, 2021
@jasonvarga jasonvarga deleted the fix/static-caching-expiration branch January 8, 2021 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static cache expiry config key is wrong
1 participant