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

[4.x] Only retrieve from origin blink cache when its not null #9661

Merged
merged 2 commits into from Mar 4, 2024

Conversation

ryanmitchell
Copy link
Contributor

#9631 (and similar other reports) seem to be being caused by the load order on multi-sites, specifically when an origin is loaded after a descendant (eg de loads before en).

As we syncOriginalState on load, and that now includes the origins, it blinks a null value, which persists.

This PR changes the origin approach from using Blink::once() to using a get/set approach, checking if the value is not null and early returning it. This should give most of the performance once() wanted, but also allow a re-query when the value is null.

Closes #9631

@jasonvarga jasonvarga merged commit 563abc0 into statamic:4.x Mar 4, 2024
18 checks passed
@ryanmitchell ryanmitchell deleted the fix/clear-origin-cache-issue branch March 4, 2024 19:11
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:warm does not work properly in multisite setup (multisite entries not being "linked" anymore)
2 participants