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.
// cache interaction
I am wondering is this required or does appfabric handle thread safety and concurrency? Any assistance with this would be great.
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.aspxYou can also read about concurrenty methods at - http://msdn.microsoft.com/en-us/library/hh351387.aspx