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

Stache Locks #2794

Merged
merged 4 commits into from
Nov 4, 2020
Merged

Stache Locks #2794

merged 4 commits into from
Nov 4, 2020

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Nov 3, 2020

This PR adds support for locks within the Stache.

If a request is made on the site while the stache is being warmed, it will just wait until the warming is finished. This prevents the subsequent response from triggering another cache build, which would increase CPU and memory usage.

If the second request (any subsequent request) waits for 30 seconds (configurable) it'll exit with a 503 status, and a meta refresh tag that'll just re-request the page.

At the moment it only locks when "warming". e.g. when you run php please stache:warm.
More locking features will be added later, like Redis support, and cache updates outside of the stache:warm command.

Closes #552

@jasonvarga jasonvarga marked this pull request as ready for review November 4, 2020 20:07
@jasonvarga jasonvarga merged commit 457e056 into master Nov 4, 2020
@jasonvarga jasonvarga deleted the feature/552-stache-lock branch November 4, 2020 20:22
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.

Stache Locking
1 participant