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 · 431 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 Paul Hodges, 4 weeks ago
19 489 6 days ago
Support · by Lauw, 1 week ago
2 106 7 days ago
Support · by Anna, 3 weeks ago
4 428 1 week ago
Support · by gtx, 4 weeks ago
4 379 3 weeks ago
Support · by Anna, 1 month ago
9 487 4 weeks ago