top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between a session and a cache in asp.net?

+5 votes
995 views
What is the difference between a session and a cache in asp.net?
posted Jan 23, 2014 by Asmita Agrawal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Cache:
1- It is small memory area.
2- Allow you to store difficult and complex constructed data which can be reused.
3- It is available to be accessed from global/application level where one reference to memory is updated. Each request will use the same cache for different users.

Session:
1- A period of time that is shared between the web application and the user.
2- Each user that is using the web application has their own session.
3- The Session variables will be cleared by the application which can clear it, as well as through the timeout property in the web config file.
4- Session variables will use different session variables for each different user.

answer Jan 23, 2014 by Atul Mishra
Similar Questions
+2 votes
+4 votes

What is the difference between <asp:Panel > and <asp:PlaceHolder > in ASP.NET? When should you use one over the other?

+2 votes

Any one Explain what is the basic difference between ASP and ASP.NET??

...