[CACHE] detect removed object

T

teo

I insert few objects in the Cache
and
use a callback to be notified of their removal

in this way:

Page.Cache.Insert("MyObj1",myDataTable1,.........., AddressOf
OnItemRemoval)

Page.Cache.Insert("MyObj2",myDataTable2,.........., AddressOf
OnItemRemoval)

Page.Cache.Insert("MyObj3",myDataTable3,.........., AddressOf
OnItemRemoval)


Is there a way to detect in the 'OnItemRemoval' sub
which object has been removed?
 
S

Sheng Jiang[MVP]

create a dummy file and invalida the cache when a file is changed.
When updating the source of the cache update the file as well
 
T

teo

now

on my pc, in the developing enviroment, the callback is
always fired and the reinsertion always happens

but

on the web site
it is not always fired
(and obviously no reinsertion can happen)
or
it is fired, but only few object (I have 5 object ) are reinserted
and in example when I try
myDataView = Me.Cache("myCachedDataViev")
sometimes I get Nothing

so there is an odd problem with
my aspx page,the IIS 6, timing, Win2000 (or 2003)...



notes:

no traffic during these tests (it's night)
no heavy elaborations performed

my callback routine is on the .aspx page
and not in a module, could be this the problem?
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top