i use HttpRuntime.Cache.Insert to insert data into cache. i have the function 'onremove' as the cacheitemremovedcallback - when the cache expires (after 15 minutes) it releases data in cache and calls 'onremove' that insert the data again to the cache.
everytime i want to use the data in the cache i check that the data is there first:
if (HttpRuntime.Cache[CACHE_DATA_TABLE] == null)
{ // load data into cache again}
what happens if i check that the data is in the cache and it is there, but as soon as i want to use it it expires? so when i call:
DATADT = (DataTable)HttpRuntime.Cache[CACHE_DATA_TABLE]
Does the HttpRuntime.Cache waits untill 'onremove' is called and finish loading the data back into cache before it extract the data ?