Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Problem with navigation and cache with login plugin

plugins

Started by Jakob Hauber 4 years ago · 1 replies · 497 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 webmasterodp, 1 week ago
4 172 1 week ago
Support · by nwhitfield, 1 week ago
2 150 1 week ago
Support · by stell, 3 weeks ago
5 381 2 weeks ago
Support · by gravinator, 1 month ago
5 573 2 weeks ago
Support · by Gravver, 3 weeks ago
6 360 3 weeks ago