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 Octane caching issue #460

Merged
merged 3 commits into from
Sep 24, 2021
Merged

Fix Octane caching issue #460

merged 3 commits into from
Sep 24, 2021

Conversation

bakerkretzmar
Copy link
Collaborator

My original PR to improve Ziggy's performance on Octane, #417, turned out to be a bit overzealous—it cached the entire Ziggy instance, including the base URL and any configured groups. While the routes don't change between requests, the app URL can, as described in #457.

Another issue I noticed looking into this is that the $group passed to Ziggy can also change, not only between requests but even in the same request if the Blade directive is used in different places, so we can't cache that either.

This PR reverts #417 and tackles caching in a slightly different way, doing it inside the Ziggy class and only caching the list of named routes and nothing else.

Closes #457.

@bakerkretzmar bakerkretzmar merged commit 2188a26 into main Sep 24, 2021
@bakerkretzmar bakerkretzmar deleted the jbk/fix-route-payload-caching branch September 24, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Octane - Wrong url
1 participant