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
Pages cache not working (neither stored not used) when checking for logged in user #4634
Comments
@sylvainjule @LaurentTacco Could you please try if the following change in line 276 of - return $header !== null;
+ return empty($header) === false; Explanation: The old line considers an empty but existing |
@lukasbestle By changing this line, cache seems to finally work as expected on my side! Thanks!! |
Same here! Thanks @lukasbestle! |
@LaurentTacco Could you please also check if changing the |
@lukasbestle Without changing anything in the core and by having |
Great, thanks for the quick reply. Then we'll fix it in both places. The |
You're welcome! |
✅ |
Description
Having read @lukasbestle's explanation in #4423, I figured the following would work. This thread in the forum suggests this should work too so I'm mentioning this as an issue. Starting with a fresh starterkit, I activate the cache in
config.php
:Pages are stored. Let's say I want to add the ability for my logged in users to have an edit button available on any front-end page which redirects to this very same page in the panel. I clear the cache and I add in my
header.php
:As soon as I do, the cache stops storing pages, the
Cache-Control: no-store, private
header is always set despite me not being logged in. Here's a video of this:Enregistrement.de.l.ecran.2022-09-08.a.12.20.31.mp4
Your setup
Kirby 3.7.5
The text was updated successfully, but these errors were encountered: