Cache Dependency Question

  • Thread starter Thread starter Jason Dean
  • Start date Start date
J

Jason Dean

Hello,

Can anybody tell me if it's possible to create a dependency on the contents
of a directory? For example, I've just built and ASP.NET image rotator that
uses System.IO to loop through all the files inside a directory, stuff them
into an array, then put that array into the ASP.NET data cache.

I want the cache to expire and be repopulated when a file is added or
removed from that image directory.

Thanks for any help with this issue.

-Jason
 
Found an easier fix. Just insert the path name like so...

Cache.Insert("Name", myArrayList, New CacheDependency("C:\Images")
Cache will update itself if any files are added, deleted, or edited.
 
Back
Top