R
Robir
When is it better to store a small amount of data (say a very small DataSet
or a couple of short string variables) in the Session vs in the Cache
object. I've had it recommended to store such things in the Cache and to
simply stay away from the Session as a general rule. But as far as I know,
storing data in the Cache puts your data at risk in that the system might
determine that the data should be purged because the system thinks it's okay
to simply because it hasn't been accessed for a while. I understand that I
can create some callback logic that will automatically re-create the data
just purged from the Cache by the system - but that's a lot of work. Am I
correct in thinking that if I store it in the Session that I don't have to
worry about the system purging it as it would if the same data were in the
Cache? If that is correct, then what's the big benefit of storing duch data
in the Cache if I have to worry about the system purging it. Doesn't the
Cache also have the same scope/lifetime as the Session?
Thoughts? Perspective? Opinions?
TIA
or a couple of short string variables) in the Session vs in the Cache
object. I've had it recommended to store such things in the Cache and to
simply stay away from the Session as a general rule. But as far as I know,
storing data in the Cache puts your data at risk in that the system might
determine that the data should be purged because the system thinks it's okay
to simply because it hasn't been accessed for a while. I understand that I
can create some callback logic that will automatically re-create the data
just purged from the Cache by the system - but that's a lot of work. Am I
correct in thinking that if I store it in the Session that I don't have to
worry about the system purging it as it would if the same data were in the
Cache? If that is correct, then what's the big benefit of storing duch data
in the Cache if I have to worry about the system purging it. Doesn't the
Cache also have the same scope/lifetime as the Session?
Thoughts? Perspective? Opinions?
TIA