In our website, developed in asp.net 4.0, our session values are getting cached. So if one user login, then all other users are getting logged in with the same session value of first user. Is this issue persists? Is there any solution for this?
Hi Midhun T P
Sounds like caching is enabled for non-cacheable content. We need to check your akamai config file. What is the host name?
We do not store session ID in cache key unless configuration file says to do so.
Session IDs are most often stored within cookies which we don't cache normally with an object. However, if your application is using Cookieless ASP.NET where the session ID is stored as a query string, then there is definitely a possibility that is is getting cached as we cache all query string parameters by default.
As Vladimir Sidorov said, it's also possible that you are inadvertently caching dynamically generated content so that once one user requests a page, a cached copy of that response is send for all following requests until the cache TTL expires.
One way around this is to consider using Dynamic Page Caching. In short, you can define a cookie or query string parameter that identifies when a user is logged in and that the responses are dynamic and unique to that user. When that is true, the response won't be cached and served from the origin server. However, for non-logged in "anonymous" user sessions where the dynamic content returned is the same, the page can be cached to help with speed and offload.
Retrieving data ...