Cache expiry?

  • Thread starter Thread starter Colin Basterfield
  • Start date Start date
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
 
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/
 
Back
Top