I\'m currently trying out the new MemoryCache
in .Net 4 to cache a few bits of data in one of our apps. The trouble I have is the objects are updated and the ca
Serialization/Deserialization will solve the problem but at the same time it defeats the porpose of having objects in memory. The role of cache is to provide fast access to the stored object and we are adding the deserialization overhead here. Since deserialization is required I would suggest cache as service , something like redis cache, it will be centralized so you don't have to have copy of memory object per worker process and deserialization is anyways done.
The key thing in this case that you chose a fast serialization/deserialization option.