How to implement a memory transaction scope in C#?

Posted by theburningmonk on Stack Overflow See other posts from Stack Overflow or by theburningmonk
Published on 2010-03-25T17:29:41Z Indexed on 2010/03/25 17:33 UTC
Read the original article Hit count: 371

Filed under:
|
|
|

Hi, we have a cache which I would like to put some transaction scopes around so that any process have to explicitly 'commit' the changes it wants to do to the cached objects and make it possible to rollback any changes when the process fails halfway as well.

Right now, we're deep cloning the cached objects on get requests, it works but it's not a clean solution and involves a fair bit of maintenance too.

I remember hearing about some MTS (memory transaction scope) solution on .NetRocks a while back but can't remember the name of it! Does anyone know of a good MTS framework out there? Alternatively, if I was to implement my own, are there any good guidelines/patterns on how to do this?

Thanks,

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET