Application or cache

S

stefano mostarda

Hi there,

In my application I need a dataset containing tables often used in pages.
They must be always available so I though Application would likely be the
best place to store the dataset. But what about Cache?. Would it be better
to load the dataset in cache and reload it when it expires?.

Thanks in advance,
Stefano Mostarda MCP
Rome Italy
 
K

Kevin Spencer

The Application Cache is the best way to go. The Application Collection is
still available, but is not thread-safe, and lacks the additional
functionality of the Cache.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

When you store in Application, you are essentially storing in cache,
although you are setting an extremely long lifetime, in most instances. You
can set up a mechanism to refresh this DataSet routinely.

Cache is a bit more flexible, however, as you have a bit more granularity on
lifespan of the DataSet, which is nice. I would recommend this over
application in instances where the data can change. NOTE: This is not real
time, but it is closer.

Using Notification Services in SQL Server, you can keep cache up to date,
but you will have to code this. This gives you a closer to real time DataSet
cache. With Yukon (out next year), you will have further options.

Take a look at the free Caching Application Block, which is rather nice:

http://www.microsoft.com/downloads/...C9-94C8-4077-AA29-AFE4074746DE&displaylang=en

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top