I have heard both stories. Personally, I refuse to use the built in cache
because it does not implement lock/unlock semantics. Given this, I have
found that if I need this functionality, I will resort to either writing my
own cache wrapper which I implement my own read/write locks, or I will stuff
*small* objects into the Application, when does employ read/write locks.
As for concurrent read/writes to cache corrupting data? Well, if you are not
implementing the CacheItemRemovedCallback handler properly, then yes, data
can become corrupted, and that is also only if you are sloppy and do not
validate any and all data coming into and out of your application.
HTH,
Bill P.
"Manit Chanthavong" <ma***@chanthavong.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
I just read, that concurrent read & writes to the Cache object corrupts
the data. My question is, Is it necessary to create a mechanism for locking
when writing to the cache?
This article seems to imply so.
http://www.codeguru.com/net_asp/CacheSync.html
However, this article states that the Cache object has a built in lock
mechanism. http://www.fawcette.com/vsm/2003%5F0...olumns/aspnet/
Thanks,
Manit Chanthavong
ma***@chanthavong.com