To cache or not to cache

D

David Lozzi

That's really not the question. The question is how do I clear all cache
programatically? For example, I want to implement cacheing on some data
driven pages however after the employees update the data on the pages i'd
like to give them the option to reset the cache so they can see the changes
instantly. How can I do this for the entire web application/web site?

Thanks!
David Lozzi
 
S

Steve

Why not use something like a for-each loop with the Cache object? You
can call the Remove() method of the Cache object to remove items.
Remember that Cache is global, not session-specific. If you have all
users accessing the data in the Cache, make sure you're aware sees the
same data.


Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
 
V

vMike

David Lozzi said:
That's really not the question. The question is how do I clear all cache
programatically? For example, I want to implement cacheing on some data
driven pages however after the employees update the data on the pages i'd
like to give them the option to reset the cache so they can see the
changes instantly. How can I do this for the entire web application/web
site?

Thanks!
David Lozzi
As other have said you can loop through or if you know exactly which item
you want to remove you can just use the remove method -- here is a snip

dim objItem as DictionaryEntry
dim strName as String

For Each objItem In Cache
strName = objItem.Key.tostring()
cache.remove(strName)
Next
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top