concurrency and thread safety with appfabric
-
Sunday, February 19, 2012 8:06 PM
I am currently working with appfabirc caching using the following methods to interact with the cache:
Get, Put, Remove
I am working with a c# application that have numerous users therefore I am concerned with concurrency and thread safety. I had in place a locking mechanism that uses a locking object when interacting with the cache eg.
lock (object)
{
// cache interaction
}
I am wondering is this required or does appfabric handle thread safety and concurrency? Any assistance with this would be great.
All Replies
-
Monday, February 20, 2012 6:10 AM
App Fabric Cache has 2 concurrency models:
1. Optimistic Concurrency Model
2. Pessimistic Concurrency Model
You can read more about these concurrency models here - http://msdn.microsoft.com/en-us/library/ee790890.aspx
You can also read about concurrenty methods at - http://msdn.microsoft.com/en-us/library/hh351387.aspx- Edited by RanganathG [MSFT]Microsoft Employee Monday, February 20, 2012 6:11 AM
- Proposed As Answer by RanganathG [MSFT]Microsoft Employee Tuesday, February 21, 2012 5:37 AM
-
Monday, February 20, 2012 5:53 PMThanks for your assistance with this.

