-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Implementation of ObjectCache using Redis #72
base: main
Are you sure you want to change the base?
Conversation
…cture as created for the other two Redis Providers.
Hi @remyblok, apologies for the incredibly long response time. Is this something you would still like to see? |
@mapalan I would still like to see this added. Without it, my understanding is that there isn't a way to allow the RedisOutputCacheProvider to cache partial view/child actions. Even with the output cache configured for Redis, child actions will still use the in-memory object cache. |
Is this referring to System.Runtime.Caching.ObjectCache? It feels very odd to me to stick this non-ASP.NET specific implementation into a package targeted at ASP.NET scenarios. What happens if the code is accidentally referring to objects that are only meant to be used in ASP.NET hosted environments? While I can certainly understand the desire to get the benefits of code-reuse, this seems like it will be problematic in the long term. Have I misunderstood something here? |
@JonCole @mapalan does that mean that there will be no supported method for using Redis output cache on partial views decorated with System.Web.Mvc.OutputCacheAttribute? This will only work on "parent" actions? If so, documentation to explain the limitations may be helpful to prevent similar issues. |
The System.Runtime.Caching.ObjectCache has only a default in-memory inplementation. I have added a implementation using Redis Cache so that the object cache can be shared over multiple instances of an app.
I used the same project structure as used for the Output Cache and Session State Provider. My goal was to reuse as much existing code as possible. The project also includes unit and functional test.