Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Problem with navigation and cache with login plugin

plugins

Started by Jakob Hauber 4 years ago · 1 replies · 464 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 complanar, 6 days ago
6 151 1 day ago
Support · by Rick Beebe, 6 days ago
2 109 3 days ago
Support · by blu3prince, 3 days ago
0 59 3 days ago
Support · by alex, 5 days ago
2 99 4 days ago
Support · by Marcel, 2 weeks ago
1 151 4 days ago