While implementing Multithreaded Cache, i found this article on MSDN.
http://msdn.microsoft.com/en-us/library/system.threading.readerwriterlockslim.aspx
This is for windows appliation using framework 4.0. My main concern is Thread Safety. Currently i am using MemoryCache and i know it is not Thread Safe. So is the provided implementation a better way to implement Multithreaded Caching?
Please advice.
I don’t quite see the relation between a
ReaderWriterLockSlimand caching. This class is used to synchronize the access to a shared resource in a multithreaded application. For implementing data caching I would recommend you taking a look at the System.Runtime.Caching namespace.