Base solution for your next web application
Open Closed

SettingManager using RedisCache #10444


User avatar
0
mattkeene created

What is your product version - 8.1.0 What is your product type - Angular What is product framework type - .net core

We're deployed on AWS behind a load balancer and need to use StackExchange.RedisCache for a js control that renders pdfs via a web service. The pdf viewer web service requires a cache that implements IDistributedCache. This requires us to add RedisCache in Startup i.e.

services.AddDistributedRedisCache(options => { options.Configuration = _appConfiguration["Abp:RedisCache:ConnectionString"]; });

and not in iUnderwriteWebCoreModule Configuration.Caching.UseRedis because AbpRedisCache does not implement IDistributedCache

This in turn obviously means we need to use RedisCache in our version of SettingManager. Post #10152 suggests this is possible by using using RedisCache for the settings caches.

We've been going in circles with this for a couple of days and have not been able to to do this. Is there an example of how using an implementation of SettingManager with RedisCache can be achieved?

Thanks you for your help


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    When you enable Redis using https://aspnetboilerplate.com/Pages/Documents/Caching#redis-cache-integration, SettingManager also uses Redis. Have you tried this ?

  • User Avatar
    0
    mattkeene created

    Yes - as my ticket said we have tried that and for the reasons described we cannot use this or we sacrifice using the 3rd party pdfviewer which requires the cache to implement IDistributedCache. AbpRedisCace does not implement IDistributedCache so we cannot use it with the pdfviewer. The AbpRedisCache implementation is also bloated and slow. There seem to be a lot of issues with aspnetzero implementations behind load balancers that are having problems with file downloads, chat, and caching. Hope you guys can get to the bottom of it.