473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Cache Object Concurrent Access

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


Nov 18 '05 #1
2 1781
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

Nov 18 '05 #2
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!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alex | last post by:
Hi all, We're looking at a vendor who uses the InterSystems Cache Database Platform, but our IT department has zero experience with this system. This software package will have a pivotal and...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
6
by: Param R. | last post by:
Hi all, lets assume my application is running under an app pool that has 2 worker processes servicing requests. Will the Application & Cache objects be the same & concurrent amongst all requests?...
1
by: William Sullivan | last post by:
I'm trying to nail down some issues with the cache in my application. Currently, I have an object that stands between my business logic and database logic called CacheLogic (cute, no?). ...
22
by: roadrunner | last post by:
Hi, Our website has recently been experiencing some problems under load. We have pinpointed a particular function which slows dramatically when we have these problems. Normally it should execute...
5
by: sethwai | last post by:
Hi, I've read everything I can get my hands on and am still very confused about the similarities and differences between db2_mmap_read/write and concurrent i/o. It seems to me at this point...
3
by: Aryan | last post by:
Hi, I have problem related to Caching of data. I am reading large xml file and putting this xml in dataset, since this dataset will contain many datatable's inside. And each datatable might be big...
3
by: wardemon | last post by:
Hi All, I have a aspx page named: ImageProcess.aspx that creates a thumbnail version of an image by passing the ImagePath, width, and height. The ImagePath is taken from a table from a database,...
5
by: Max2006 | last post by:
Hi, Since Application collection and Page.Cache can be shared among all sessions, I wonder if they are thread safe? Thank you, Max
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.