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

Grav menu and cache #29

Open
Japhys opened this issue Mar 7, 2022 · 4 comments
Open

Grav menu and cache #29

Japhys opened this issue Mar 7, 2022 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@Japhys
Copy link

Japhys commented Mar 7, 2022

Still using this theme with much pleasure :)

You helped me with the log in / log out menu which works great. #25

The menu is cached though so you tend to see the logged in menu while actually logged out, for example because the session has expired. You will have to F5 the page. Is there a way to prevent this menu from being cached (ESI?) or maybe there is a better way to handle this?

@ParitoshBh ParitoshBh self-assigned this Mar 22, 2022
@ParitoshBh ParitoshBh added the help wanted Extra attention is needed label Mar 22, 2022
@ParitoshBh
Copy link
Owner

Hmm.. Interesting, I am not sure what a solution might be. I'll have to look through documentation. Will report back with findings.

@ParitoshBh
Copy link
Owner

@Japhys So this appears to be plugin/Grav issue than the theme itself. Refer this thread getgrav/grav-plugin-login#264

It has some potential solutions that you can try.

@ParitoshBh
Copy link
Owner

I quickly tried on my dev instance following config,

  expires: 3600
  cache_control: 'private, max-age=0, must-revalidate'
  etag: true

This seems to work. However, I am no expert and will suggest you do some reading on what these cache control terms mean before using these - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

@Japhys
Copy link
Author

Japhys commented Mar 26, 2022

Thank you very much once again, I'll give it a try this weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants