recommendation for basic memory caching across process

50 Views Asked by At

The implementation is for a simple scenario coded in .net 4.5,

  1. in memory cache of a list of serializable objects
  2. the setter and getter of the list resides in different processes
  3. ideally the cache provides a builtin thread safe way to access the cached item

originally I was thinking to use a static class, or a MemoryCache, but has some trouble to think a way to share the cache across the processes. Is this a good fit for Redis cache?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, Redis is a good fit for your problem with different applications accessing your cache. It has a lot of features -see http://redis.io/documentation, all the data is kept in memory so it is very fast, it is thread safe because it has just one thread doing the work and there is good support for it in the .NET world - see the https://github.com/StackExchange/StackExchange.Redis