System.Web.HttpContext.Current.Cache信息 [英] System.Web.HttpContext.Current.Cache information
问题描述
我想问一下,如果 System.Web.HttpContext.Current.Cache
为每个用户如会话
或者,如果它是每个应用程序。在何种情况下是很好的使用缓存?
I would like to ask if System.Web.HttpContext.Current.Cache
is per User like the Sessions
or if it is per application. On which circumstances is nice to use Cache?.
推荐答案
有一个每个应用程序域缓存类的实例。
其结果是,由Cache属性返回的Cache对象
是在应用领域的所有请求缓存对象。
There is one instance of the Cache class per application domain. As a result, the Cache object that is returned by the Cache property is the Cache object for all requests in the application domain.
对于你的问题。
在何种情况下是很好的使用缓存?
On which circumstances is nice to use Cache?.
请缓存的信息将由多个用户共享和(通常)如果只读
。例如在保持高速缓存查找值。您可能会看到:
Keep that information in Cache which will be shared by multiple users and (usually) if its readonly
. For example keeping lookup values in cache. You may see:
<一个href=\"http://www.asp.net/web-pages/tutorials/performance-and-traffic/15-caching-to-improve-the-performance-of-your-website\">Caching在ASP.NET网页现场数据有更好的表现
这篇关于System.Web.HttpContext.Current.Cache信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!