Cache Object Concurrent Access

Discussion in 'ASP .Net' started by Manit Chanthavong, Nov 19, 2003.

  1. Manit Chanthavong, Nov 19, 2003
    #1
    1. Advertising

  2. Manit Chanthavong

    Bill Priess Guest

    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" <> wrote in message
    news:%...
    > 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_05/magazine/columns/aspnet/
    >
    > Thanks,
    >
    > Manit Chanthavong
    >
    >
    >
    >
    >
    Bill Priess, Nov 19, 2003
    #2
    1. Advertising

  3. 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!
    Manit Chanthavong, Nov 19, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Frey
    Replies:
    3
    Views:
    2,936
    kekoav
    Mar 6, 2008
  2. Pep
    Replies:
    6
    Views:
    810
  3. Frank Abel

    concurrent access to object file

    Frank Abel, May 23, 2005, in forum: Python
    Replies:
    0
    Views:
    365
    Frank Abel
    May 23, 2005
  4. Mike Meyer

    concurrent access to object file

    Mike Meyer, May 26, 2005, in forum: Python
    Replies:
    1
    Views:
    336
    Frank Abel
    May 27, 2005
  5. CJM
    Replies:
    12
    Views:
    339
Loading...

Share This Page