views:

1390

answers:

1

We have an ASP.net (2.0) application configured to run with multiple worker processes using the web garden option in IIS. Most of our data is cached and occasionally we have to clear the cache when there are changes to the site. We have a simple page that will iterate through the HttpCache items and clear them.

But each worker process has its own copy of the HttpCache object and so when we request for the cache refresh page, it only clears the cache for the process which services that particular request. The cache for the other worker processes are not cleared.

Is there a way to clear the HttpCache for all the worker processes other than programmatically recycling the app pool?

+2  A: 

I think in the following post nicholas did explain the same scenario. Please go thgrough it asp.net 2.0 cache api will not work for web garden. You have do some third party caching mechanism.

http://nicholas.piasecki.name/blog/2009/02/on-web-gardens-aspnet-and-iis-60/

Another good discussion about cache in web garden is the following: http://forums.asp.net/p/1077042/1588690.aspx

Hope this will slove your query.

jalpesh