c# - Data cache vs session object in ASP.Net -


Dynamic business object must be stored in a user session for a site or should use ASP.NET caching (eg objects Order, profile information etc.)?

I have worked with sites that use sessions to store merchandise, but I was thinking ... What are the advantages or disadvantages of caching?

If users are able to share objects between sessions, then use the cache. If the objects are unique for each session - perhaps because they are operated according to permissions - then store it in session In-process session is stored in the cache, therefore the deciding factor should actually be the scope of the data.


Comments