Reputation: 424
I am using System.Runtime.Caching in windows application(c#)
This works fine for single machine. Now I want to share cache between multiple instances running on different computers.
So I am thinking of using MEMCACHED or Hazelcast IMDG
Any c# implementation or idea/ results how this works. Please note I am doing this for windows application. Any other suggestion is also welcome.
Thanks
Upvotes: 1
Views: 763
Reputation: 11478
Using In memory cache, needs clear understanding of following use cases:
IQueryable
, provided by the frameworks like Entity Framework for the Sql Server
?If its only in memory dump then Redis, MemCache
are fine, as they just store data in the memory as binary, de-serialized once fetched at the client location, which is not good if you are querying lots of data and want processing like filtering, sorting, pagination to be done at the source.
In case IQueryable
processing is required, then check out ApacheIgnite.Net. Hazelcast and ScaleOut
, out of them I find Apache Ignite to be most advanced, since it just doesn't support the Expression trees, via IQueryable
, but also Ansi Sql
, which is a very big advantage over other Cache
Also another point remains, why not replace Sql Server or similar database by a modern in memory system like VoltDB
or Document db like Raven
, as they are much faster, well integrated and completely exclude the need to separate Cache
Upvotes: 3
Reputation: 49600
I would suggest you to use Redis
for caching purpose.
Here's a good c# library for Redis: ServiceStack.Redis
Upvotes: 2