I'm having a problem with navigation that seems to get cached.
If the page is loaded by someone who is not logged in, it shows the login button in the navigation (and it should).
Once the user is logged in and returns to that specific page (by clicking a link on the site), the page still shows the login button.
Only when the user manually refreshes the page, the login button gets replaced by the users name.
The template code uses the currentUser variable, which is never overwritten anywhere else.
There's no cache blocks used on the website, and the cache-control header is set to no-store, no-cache, must-revalidate
{% if currentUser %}
{% if currentUser.firstName != '' and currentUser.lastName != '' %}
{{ currentUser.firstName }} {{ currentUser.lastName }}
{% else %}
{{ currentUser.email }}
{% endif %}
{% else %}
{{ loginPage.title }}
{% endif %}