Z
Zeljko
Hi,
I was playing with the cache class (caching data, not fragments or
pages). It seems to be a very usefull feature, but I didn't manage to
find an explanation on how it works behind the scene. Except being
plain curious about it, I have a few concrete reasons for wanting to
know that, like:
- Can I store instance of a class in the cache ? If I can, what will
happen if one session pulls that object out of the cache and calls
it's method which changes content of the object ? Will the change be
visible globally ? I suppose yes ?
- Does that class need to be marked Serializable ? I noticed that if
you want to store object in the StateBag, that object must be marked
Serializable. Does something similar apply to Cache ? I tried that on
my machine and had no problems, but haven't tried it yet on the web
server - need to verify that other users see changes made to the
cached class...
Zeljko
I was playing with the cache class (caching data, not fragments or
pages). It seems to be a very usefull feature, but I didn't manage to
find an explanation on how it works behind the scene. Except being
plain curious about it, I have a few concrete reasons for wanting to
know that, like:
- Can I store instance of a class in the cache ? If I can, what will
happen if one session pulls that object out of the cache and calls
it's method which changes content of the object ? Will the change be
visible globally ? I suppose yes ?
- Does that class need to be marked Serializable ? I noticed that if
you want to store object in the StateBag, that object must be marked
Serializable. Does something similar apply to Cache ? I tried that on
my machine and had no problems, but haven't tried it yet on the web
server - need to verify that other users see changes made to the
cached class...
Zeljko