Redis ICache Implementation

Jul 21, 2014 at 12:55 AM
I have downloaded and tried out this project. First of, I'd like to say this is awesome. It works really well for the InMemoryCache implementation. I would love to use this project in a load balanced environment and thus would like to have an implementation using Redis cache. Does anybody have any ideas on how to achieve this?
Jul 21, 2014 at 7:19 AM
I don't think there is an implementation that is using Redis as a caching mechanism. You would have to implement ICache interface. Teoni Valois implemented this interface for Dache - a distributed cache for .NET. You may want to take a look at the code ( for some ideas. On the other hand if you implemented this and would like to contribute to the project I would be glad to accept it if it meets my quality bar.

Jul 22, 2014 at 4:59 PM
That example should help get me started. I will give it a shot and see what I come up with. Thanks for your help.
Jul 22, 2014 at 5:34 PM
When I was using the old EFCachingProvider with EF 4, we deployed to a load-balanced environment and rolled our own synchronization mechanism using SQL Query Notifications and the SqlDependency class. Once we received a notification in our app, we'd manually invalidate the cache. This technique should work for any cache provider, including EFCache + Redis.

Check out this link to get you started:

If I find myself with some extra time, maybe I can write up a blog post. Meantime, I'd be happy to answer any questions you have if you want to go down this road.
Sep 10, 2014 at 9:49 PM
I've seen a pull request about that in your project...are you going to merge it?
Sep 11, 2014 at 12:31 AM
@XVincentX - thanks for pointing me to this. I have not received any notification and just was not aware of this PR. I will take a look and let you know.
Sep 11, 2014 at 6:26 AM
@XVincentX - I can't take this contribution because it introduces a dependency on Redis to EFCache which many people won't need. I believe the right way of doing this is to create a separate EFCache Redis package that takes a dependency on EFCache. I offered help with doing this because I would love this to be finished - especially given that the most of the work has already been done.

Sep 18, 2014 at 3:26 AM
The Redis cache implementation for EFCache is now available on NuGet as a separate package -