Hi everyone,
I've been playing around a little with .NET 2. A tool i'm working on
produces some data in one aspx page, stores it in the cache. Subsequently, a
different page causes the data to be retrieved from the cache, updated and
reinserted with the same cache name (overwriting over the old data). Back on
my first page again, when I action the data to be output somewhere (to page
for example) the data displays as the original data, not the updated
version.
I'm not using any sliding expiration, I have an absolute point that the
cache should be emptied etc. It just appears that page 2's changes to the
cache are not reflected when seen from page 1.
If I create a new cache item in page 2 (with different key) then I can
access it fine from page 1 (thus essentially fixing the problem, or getting
around it anyway). However, i'd like to understand the behaviour.
My thoughts so far have been:
1. a cache item is owned by the page in which it was created and can not
be edited by other pages, although it can be viewed by them - this doesnt
seem likely at all though...
2. using the cache is perhaps not correct in my situation, although id
still like to know why i can't use it.
I hope someone can clarify a little what's going on here - please shout up
if more details are required.
thanks,
Andrew
Alvin Bruney [MVP] - 27 Feb 2007 00:33 GMT
You have a bug in your code, this behavior is not by design. However, the
cache is overkill for that type of thing, change the name from cache to
session, all the rest of the code remains the same. I assume you will have
the same issue since the big is probably in your logic.

Signature
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
> Hi everyone,
>
[quoted text clipped - 26 lines]
> thanks,
> Andrew