Hello Team,
I am using IAbpPerRequestRedisCacheManager in my project. When running the Migrator project, I encounter the following error because UserFriendsCache is utilizing IAbpPerRequestRedisCacheManager.
Additionally, UserFriendsCache is dependent on ChatUserStateWatcher, which in turn is used in the CDPCoreModule class.
Error : Castle.MicroKernel.Handlers.HandlerException: 'Can't create component 'CDP.Friendships.Cache.UserFriendsCache' as it has dependencies to be satisfied. 'CDP.Friendships.Cache.UserFriendsCache' is waiting for the following dependencies:
- Service 'Abp.Runtime.Caching.Redis.IAbpPerRequestRedisCacheManager' which was not registered.'
Find below the screenshots for reference :
Please assist with resolving this issue.
1 Answer(s)
-
0
Hi @kansoftware
Did you define the setting mentioned under the heading in this document when calling the UseRedis method?
[DependsOn(typeof(AbpAspNetCorePerRequestRedisCacheModule))] public class AbpZeroTemplateWebCoreModule : AbpModule { //... public override void PreInitialize() { //... Configuration.Caching.UseRedis(options => { options.ConnectionString = _appConfiguration["Abp:RedisCache:ConnectionString"]; options.DatabaseId = _appConfiguration.GetValue<int>("Abp:RedisCache:DatabaseId"); }, usePerRequestRedisCache: true); } }Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)

