Cache expiry?

C

Colin Basterfield

Hi,

I am trying to use the Cache to pass information between pages, so rather
than load up the query string with vars, I load it up on the first page, but
the cache is empty on arrival to the subsequent page, can I prevent this
using CacheDependency or shall I get my coat?

Many thanks as ever
Colin B
 
R

Rick Strahl [MVP]

Hi Colin,

The Cache is not a good place to pass information to another page with
because the Cache is global to all users. If two users are accessing this
page at the same time you will have inconsistent results.

You should use Session for this.

Now as to why the Cache is empty I'm not sure. If you write it it should
definitely be there on the next hit.

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/blog/
 

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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top