Is there a package to use HybridCache with Redis in .NET Aspire 9? #7353
-
I'm working on a project and I would like to use hybrid cache with redis and Aspire. There is a package for OutputCache "Aspire.StackExchange.Redis.OutputCaching" but I could not find something similar for hybrid cache. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
HybridCache is a consumer of distributed cache. So: Side note: the main difference between the backends for output-cache and distributed-cache is: tags; hybrid-cache adds tags inside of distributed-cache. That means that it should be possible to - and I'll intend to try to - implement output-cache over hybrid-cache. This should reduce the amount of setup, allow better connection sharing, and enable output-cache on more backends (there are more DC backends than OC backends). |
Beta Was this translation helpful? Give feedback.
HybridCache is a consumer of distributed cache. So:
AddRedisDistributedCache
andAddHybridCache
together should do what you want. I'll defer to @sebastienros on whether there should be a one-shot for this.Side note: the main difference between the backends for output-cache and distributed-cache is: tags; hybrid-cache adds tags inside of distributed-cache. That means that it should be possible to - and I'll intend to try to - implement output-cache over hybrid-cache. This should reduce the amount of setup, allow better connection sharing, and enable output-cache on more backends (there are more DC backends than OC backends).