iis8.5 缓存_使用IIS5或IIS6的Web园艺方案中的ASP.NET缓存对象

iis8.5 缓存

iis8.5 缓存

Remember that "Web Gardening" is like having a tiny Web Farm on a multi-proc box.  Each processor gets an ASP.NET Worker Process with affinity (that means the process "sticks") to that processor.

请记住,“ Web园艺”就像在多处理盒上拥有一个小型Web场一样。 每个处理器都会获得一个与该处理器具有亲和力的ASP.NET辅助进程(这意味着该进程“粘”)。

But what happens if you use the Cache object?  Well, each AppDomain gets a Cache object, and each ASP.NET Worker Process has one AppDomain per Web Site, and each processor gets one WP, so...if you have four processors, the Cache object will exist four times.

但是,如果使用Cache对象会发生什么? 好吧,每个AppDomain都有一个Cache对象,每个ASP.NET工作进程每个网站都有一个AppDomain,并且每个处理器都有一个WP,因此...如果您有四个处理器,则Cache对象将存在四次。

That means, ASP.NET Cache state is NOT shared amongst processors in a single-box multi-proc system.

这意味着,单盒多进程系统中的处理器之间不会共享ASP.NET缓存状态。

Make sure you grok this if you ever find yourself working on a single box web site with multiple procs and web gardening on.  If you've:

如果您发现自己在一个具有多个proc并具有网络园艺功能的单一网站上工作,请确保您对此不满意。 如果您已经:

  • coded your site to assume that the cache will fill once and only once per machine

    对您的站点进行编码,以假定缓存将填充到每台计算机一次,并且只能填充一次
  • used physical files as CacheDependancies to key off the cache

    使用物理文件作为CacheDependancies来关闭缓存
  • assumed that any one user will magically return to the same process on the same machine on subsequent requests

    假定任何一个用户将在后续请求中神奇地返回同一台计算机上的同一进程

then things may well behave differently than you thinkin a web gardening scenario.

那么事情可能会与您在网络园艺场景中的想法有所不同。

翻译自: https://www.hanselman.com/blog/the-aspnet-cache-object-in-a-web-gardening-scenario-with-iis5-or-iis6

iis8.5 缓存

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值