The cache is good, but it is considered volatile. There is never any
guarantee that the data is there. The item may be removed when it expires or
some condition is met (something you explicitly set), or the runtime may
remove the item when memory gets low. In contrast, the application variables
are there for the duration of the applications life, unless explicitly
removed by you and it provides methods to synchronise access to the
varibales as well. (.Lock for example).
--
- Paul Glavich
Microsoft MVP - ASP.NET
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:j5********************************@4ax.com...
The cache object is more flexible in the long run. You can set a
duration and a priority for the cached item, for instance.
--
Scott
http://www.OdeToCode.com
On Sat, 10 Jul 2004 05:32:46 +0200, "Daniel Walzenbach"
<da**********************@freudenberg.de> wrote:
Hi,
I need to cache infrequently changed data used by the entire application.
Does anybody know whether using Application state
(Application["YourGlobalState"] = somevalue;) or the Cache API
(Cache.Insert) is more preferable?
Thanks a lot
Daniel