HttpContext.Cache property store?

I am using the HttpContext.Cache property to check multiple logins on an asp.net website. I am adding a combination of username and password to the cache item.

I want to know where this HttpContext.Cache object will be stored on the server side or client side? and what are all the disadvantages of storing such credentials in the cache? Please, help

+3


source to share


1 answer


The cache is kept in server memory for a constant period of time. The cache is created one for each application.

The disadvantages of a cache depend on how you want to use the cached data. For example, compared to session

, the cache expires after a certain time, during which the session will remain there until the end of the session.



On the other hand, ASP.NET can remove data from the cache if it runs out of memory. The cache cannot be stored externally (SQL Server, etc.). It is not possible to share the cache among multiple instances of a web application.

+5


source







All Articles