Where is the best place to store the name of the loggedin user to display it on the frontend?
I am currently storing it in the cookie session but I am sometimes encountering the case where the user is logged in but the stored name is not available.
PS: I can not store it in the local storage as we might have different users logged in from the same device.
Because i had faced the issue of cached user details when someone loggedout and another one loggedin. But i will follow your suggestion and releoad the serverconnect cache on login. Thank you
Perhaps as an alternative you could check the cookie value (from a SSI) and redirect to login if the cookie value is not set/ set correctly, personally i would go for Teodors suggestion but this may work as an alternative