Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Cache Object Concurrent Access

Reply
Thread Tools

Cache Object Concurrent Access

 
 
Manit Chanthavong
Guest
Posts: n/a
 
      11-19-2003
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
http://www.velocityreviews.com/forums/(E-Mail Removed)




 
Reply With Quote
 
 
 
 
Bill Priess
Guest
Posts: n/a
 
      11-19-2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
> (E-Mail Removed)
>
>
>
>



 
Reply With Quote
 
 
 
 
Manit Chanthavong
Guest
Posts: n/a
 
      11-19-2003
Thanks for your indepth and quick response. I'll rearch more on
implementing custom caching techniques.

Thanks,

Manit Chanthavong

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] celluloid 0.0.3: a concurrent object framework for Ruby Tony Arcieri Ruby 9 06-20-2011 04:31 AM
problems locating the concurrent EDU.oswego.cs.dl.util.concurrent package Pep Java 6 08-16-2005 07:26 AM
concurrent access to object file Mike Meyer Python 1 05-27-2005 12:11 AM
concurrent access to object file Frank Abel Python 0 05-23-2005 08:13 PM
Concurrent Web- and direct access to an Access DB CJM ASP General 12 07-08-2004 01:51 PM



Advertisments