Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / December 2003

Tip: Looking for answers? Try searching our database.

CacheDependency doesn't work in windows 2003!!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian - 20 Dec 2003 10:32 GMT
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;

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.