-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
[5.x] Fallback to nocache
content when request is missing the Cache
middleware
#9406
[5.x] Fallback to nocache
content when request is missing the Cache
middleware
#9406
Conversation
…ddleware-is-missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failing test that's happening now would have happened before too if you ran it by itself.
Since you had a static property, its value sticks around between tests.
So lets say you had one test that set that to true, when it got to this test, it would still be true. This made it pass, but it shouldn't have.
Anyway, the remaining failing test is just some whitespace changes. I'll dig in some more when I have more time. I'm not sure that editing the test is the answer. There must be a reason it changed.
…ddleware-is-missing
…e-content-when-cache-middleware-is-missing
nocache
content when request is missing the Cache
middlewarenocache
content when request is missing the Cache
middleware
…ddleware-is-missing
…ddleware-is-missing
Made the route test just care about replacing regions. Move the nested logic to a different test. If there was a nested nocache tag, it wouldn't be in the view. It would have been converted to a placeholder string.
This pull request fixes an issue with the
{{ nocache }}
tag on custom routes that aren't using Statamic'sCache
middleware, used for static caching.Previously, if you used the
{{ nocache }}
tag or it's Blade directive counterpart on a custom route without the middleware,NOCACHE_PLACEHOLDER
text will have been displayed.This PR fixes that and simply falls back to the intended contents / view when the response isn't being statically cached.
Fixes #6744.