Why System.Web.Cache lost cache once in a while?

The cache will automatically start removing items when your system runs low on memory, the items it picks can be controlled to some degree by the priority you give them when you insert them into the cache. Use the CacheItemPriority enum to specify the priority in the Cache.Add() method. Yes the cache is fine for production, whether it is good or not for your specific implementation only you can tell.

You can also provide a callback method in the Cache.Add() method that is called when the item is removed from the cache. This will give you the reason the item was removed. – bleeeah Jan 22 '10 at 11:03 thank you for this very useful information :) – DucDigital Jan 22 '10 at 12:10.

The other issue to watch for is when the IIS application pool gets recycled.

Yes, ASP. NET cache is perfectly fine for production use (however, consider Velocity if you have a web farm). And yes, it does automatically remove items based on memory, item priority & other "metrics".

Im looking between memcached and velocity, I want to check out the speed since memcached is not originally for Windows so im not sure of it's perfomance. – DucDigital Jan 22 '10 at 12:11.

I set up a few pages with OutputCache profiles and confirmed that they are being cached by using multiple browsers and requests to retrieve the page with a timestamp which matched across all requests. When I try to enumerate the HttpContect. Cache it is always empty.

Any ideas what is going on here or where I should be going for this information instead? It's not client cache because multiple browsers are seeing the same response. Here is a bit of code to explain what's happening.

Cache is where the count is always null, even though the cache seems to be working fine.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions