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.
"Robbe Morris - MVP C#" <in**@turnkeytools.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Look up FileSystemWatcher in help.
--
Free ASP.NET Business Icons And Graphics
http://www.eggheadcafe.com/free_grap...lt.asp?start=1
"Jason Dean" <jd******@yahoo.com> wrote in message
news:2P******************@fe06.lga... 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