Base solution for your next web application
Open Closed

Refreshing SessionCache Login Informations #5663


User avatar
0
sbenfares created

Hi,

In my app, i'm using SessionCache LoginInformation ViewModel in my layout view to display the user.surname.

I have a form for updating the surname if needed, how can i update the SessionCache LoginInformation after posting my form ?

Because now it keeps the cached value, and it's different from my database value.

Thanks


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    You can inject IHttpContextAccessor and then remove the __PerRequestSessionCache of the Items

    PerRequestSessionCache

  • User Avatar
    0
    sbenfares created

    Thanks it works !

    PS : Awesome support for ANZ :)