Cache Dependency Question

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
 
J

Jason Dean

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,235
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top