开发者

cache Vs Session [duplicate]

This question already has answers here: Closed 11 years ago.

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 a开发者_如何学编程nd Session?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜