Hi~
I use ASP.NET (framework 1.1 and windows 2003 server-)
Cache works well but it never expires with the
CacheDependency object and Expire Time Setting.
In Windows XP, as far as I remember, It really Does Works
(Code)
CacheDependency dep=new CacheDependency(Server.MapPath
("my.xml"));
if(Cache["Count"]==null)
Cache.Insert("Count", 0, dep);
Cache["Count"] = (int)Cache["Count"] + 1;
Jerry III - 20 Dec 2003 23:44 GMT
There are so many race conditions in your code that you don't see the
expiration. For example, if the item expires when the last statement fetches
the object to increment it, it will be re-written by the same statement
putting the object back to the cache, making it look like it never expired.
Jerry
> Hi~
>
[quoted text clipped - 11 lines]
>
> Cache["Count"] = (int)Cache["Count"] + 1;