Difference between data cache and static variables???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Howdy All"

Other then the automatic expiration stuff that you can set when using the
data cache, what the the technical advantages of using the data cache versus
static application variables?

Testing has shown about the same behavior, am I missiing something??

Thanks
 
The cache is thead-safe, while reading / writing a static reference
variable is not (at least not without some additional work). Note that
the objects in the cache may not be thread safe, but the cache
collection itself is.

That's one difference.
 
By "data cache" are you referring the the Application Cache?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
I have alwasys seen it as the data cache, I guess it would be the application
cache. As Scott pointed out, it is sycnronized under the covers.

Referencd like this...

Cache["Channel"] = chnl;
 

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

Back
Top