The Artima Developer Community
Sponsored Link

.NET Buzz Forum
The ASP.NET Cache object in a Web Gardening scenario with IIS5 or IIS6

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Hanselman

Posts: 1031
Nickname: glucopilot
Registered: Aug, 2003

Scott Hanselman is the Chief Architect at Corillian Corporation and the Microsoft RD for Oregon.
The ASP.NET Cache object in a Web Gardening scenario with IIS5 or IIS6 Posted: Aug 17, 2004 9:54 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Scott Hanselman.
Original Post: The ASP.NET Cache object in a Web Gardening scenario with IIS5 or IIS6
Feed Title: Scott Hanselman's ComputerZen.com
Feed URL: http://radio-weblogs.com/0106747/rss.xml
Feed Description: Scott Hanselman's ComputerZen.com is a .NET/WebServices/XML Weblog. I offer details of obscurities (internals of ASP.NET, WebServices, XML, etc) and best practices from real world scenarios.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Scott Hanselman
Latest Posts From Scott Hanselman's ComputerZen.com

Advertisement

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.

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.

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

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:

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

Read: The ASP.NET Cache object in a Web Gardening scenario with IIS5 or IIS6

Topic: Congrats to Beantown .NET User Group Previous Topic   Next Topic Topic: Beantown.NET an Official INETA Users Group!!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use