Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Problem with navigation and cache with login plugin

plugins

Started by Jakob Hauber 4 years ago · 1 replies · 363 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 Duc , 6 hours ago
1 29 6 hours ago
Support · by Thomas, 1 week ago
3 103 15 hours ago
Support · by Anna, 4 days ago
2 101 1 day ago
Support · by Justin Young, 2 days ago
1 66 2 days ago
Support · by Duc , 1 week ago
2 102 6 days ago