-1

Possible Duplicate:
Cache v.s Session

when where we have to use Cache

when where we have to use Session

in which Situation we have to use cache and Session?

Community
  • 1
  • 1
Dinesh Sharma
  • 117
  • 4
  • 5
  • 16
  • **Asked 12 questions, never accepted any answer, never upvoted or even downvoted. Am I mad to answer?** – Aliostad May 06 '11 at 10:57
  • @user654848 Please respect proffessionals who are helpfing you. Even I am a beginner and I have posted so many questions and I know how much effort they all put to answer the question. – Chris May 06 '11 at 11:20

2 Answers2

0

Use Cache:

  • To cache commonly used contents between users.
  • To cache frequently used data.
  • When you wants to speed up your site.

Use Session:

  • To store user specific data
  • Don't save high amount of data in session, it requires server resources and at end it speeds down the site.
Waqas Raja
  • 10,802
  • 4
  • 33
  • 38
0

Have a look at the ASP.NET State Management overview.

Session state is used for storing user specific data that you wish to have access to during the user's current session.

Cache is used for data you want to avoid fetching from a slower or more expensive data source. Usually the cached data is for many users or the system itself.

PHeiberg
  • 29,411
  • 6
  • 59
  • 81