Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Problem with navigation and cache with login plugin

plugins

Started by Jakob Hauber 4 years ago · 1 replies · 554 views
4 years ago

Hello,
i am building my first site with grav cms, typhoon theme and the login plugin. My problem is now, that after a user login or logout, the navigation is always wrong at the first site impression. After a reload, the navigation changes from "Login" Link to "Username" Link correctly.
I guess it is something with my caching. I really want to use some caching for performance. Can I exclude the navigation from caching?

Thank you
Best
Jakob

4 years ago

Great question! There might be something I am forgetting, it would certainly be a useful feature.

The first idea I had was the new Twig cache tag, but this seems to only set the cache time rather than toggling it. I wonder if you can set that very short for the menu template? Seems to be worth trying.

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 228 10 hours ago
Support · by alex, 2 months ago
8 667 1 day ago
Support · by Supple, 5 days ago
1 98 2 days ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago