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

Optimize genlocks usage #19

Merged
merged 2 commits into from
Apr 1, 2021
Merged

Optimize genlocks usage #19

merged 2 commits into from
Apr 1, 2021

Conversation

joehoyle
Copy link
Member

Currently many requests unnecesarily get no batcache serving or headers set due to over-generic genlocks. At the moment a single genlock goves a url path, like /wp/v2/posts, which means any requests to /wp/v2/posts?per_page=1 will not get cached, or send cache headers while the first request to /wp/v2/posts is processing.

I see no reason why genlocks and versions should not be tracked against the exact batcache cache key, rather than URL-only.

Currently many requests unnecesarily get no batcache serving or headers set due to over-generic genlocks. At the moment a single genlock goves a url path, like `/wp/v2/posts`, which means any requests to `/wp/v2/posts?per_page=1` will not get cached, or send cache headers while the first request to `/wp/v2/posts` is processing.

I see no reason why genlocks and versions should not be tracked against the exact batcache cache key, rather than URL-only.
advanced-cache.php Outdated Show resolved Hide resolved
@joehoyle joehoyle requested a review from roborourke April 1, 2021 12:18
@joehoyle joehoyle merged commit 3a7f724 into master Apr 1, 2021
@joehoyle joehoyle deleted the optimize-genlock branch April 1, 2021 13:55
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.

2 participants