Difference between data cache and static variables???

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
 
S

Scott Allen

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.
 
K

Kevin Spencer

By "data cache" are you referring the the Application Cache?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
G

Guest

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

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top