c# – System.Web.HttpContext.Current.Cache信息

我想询问System.Web.HttpContext.Current.Cache是​​否像Sessions一样是每个用户,还是每个应用程序.在哪种情况下使用Cache很好?

解决方法

HttpContext.Cache Property – MSDN

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?.

将该信息保存在Cache中,该信息将由多个用户共享,并且(通常)如果其只读.例如,在缓存中保留查找值.你可能会看到:

Caching Data in an ASP.NET Web Pages Site for Better Performance

相关文章

在要实现单例模式的类当中添加如下代码:实例化的时候:frmC...
1、如果制作圆角窗体,窗体先继承DOTNETBAR的:public parti...
根据网上资料,自己很粗略的实现了一个winform搜索提示,但是...
近期在做DSOFramer这个控件,打算自己弄一个自定义控件来封装...
今天玩了一把WMI,查询了一下电脑的硬件信息,感觉很多代码都...
最近在研究WinWordControl这个控件,因为上级要求在系统里,...