1

I need to put the same object in the cache in 2 regions in an atomic way.

I was thinking of using the locking mechanisms available with AppFabric, but it seems there is no way to acquire a lock, put objects in the cache under this lock, then release the lock.

Am I wrong ?

Usually, putting objects in the cache goes very well but today one call to Put took 9 seconds to complete and a concurrent Remove calls removed the object in the first region. I ended up having my object in only one region instead of too.

Thanks in advance.

1 Answers1

0

You can't, but there is another way to do that.

See the code and comments of this question

Community
  • 1
  • 1