![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Ok, we've now figured out how to work around what seems to be an overly aggressive cache scavenging in ASP.NET 2.0. I'm not saying this is a bug but it's definitely something that has changed since 1.1 and people should be aware of because it's damn hard to find because you simply repopulate the cache when it gets emptied. We had the following code Current.Cache.Insert("config", objConfig, New Caching.CacheDependency("c:\mydir\config.xml")) This code was running fine on 1.1. Cache was never being emptied (unless the dependant file was changed). I have verified this now by using our logging framework. Same code constantly gets reset in 2.0, sometimes just after Cache.Insert when stepping through code. This started when we had to swap to HttpRuntime.Cache but it's the same with HttpContext.Current.Cache - we just happened to notice it when trying HttpRuntime.Cache because we needed to access it from a TimerCallback function. We changed to Current.Cache.Insert("config", objConfig, New Caching.CacheDependency("c:\mydir\config.xml"), Web.Caching.Cache.NoAbsoluteExpiration, Web.Caching.Cache.NoSlidingExpiration, Web.Caching.CacheItemPriority.NotRemovable, Nothing) It sticks and works. This is constantly reproducable, we have no resource problems and are running on WinXP. Not sure if you have the same problem with other dependency types. - Manso |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Has there been anymore information on this problem? I am running into the same issue? |
#6
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |