F
Fernando Chilvarguer
Hi,
I'm retriving data from a database and storing it on the Cache Object using
the following code:
HttpContext.Current.Cache.Insert(
cacheItemKey,
contentDS, //THE DATASET WITH MY DATA
null,
DateTime.Now.AddSeconds(600),
TimeSpan.Zero
);
It works fine but I'm having a strange behaviour I cannot find the cause:
I click around the site to test the speed and the usage of the cache (using
TRACE).
I get to different results at random (from my trace):
1 loaded from cache 2.251844
this is TOO LONG since the other times I get:
1 loaded from cache 0.002361
Nothing changes but for some reason, suddenly the operation that takes 0.002
seconds decide to take 2.25 seconds.
In both instances the data is being loaded from the cache, otherwise my
trace would output "loaded from resource".
Any ideas?
Thanks,
Fernando
I'm retriving data from a database and storing it on the Cache Object using
the following code:
HttpContext.Current.Cache.Insert(
cacheItemKey,
contentDS, //THE DATASET WITH MY DATA
null,
DateTime.Now.AddSeconds(600),
TimeSpan.Zero
);
It works fine but I'm having a strange behaviour I cannot find the cause:
I click around the site to test the speed and the usage of the cache (using
TRACE).
I get to different results at random (from my trace):
1 loaded from cache 2.251844
this is TOO LONG since the other times I get:
1 loaded from cache 0.002361
Nothing changes but for some reason, suddenly the operation that takes 0.002
seconds decide to take 2.25 seconds.
In both instances the data is being loaded from the cache, otherwise my
trace would output "loaded from resource".
Any ideas?
Thanks,
Fernando