- ABP Framework version: v7.0.3 Microservices
- UI type: Angular
- DB provider: MongoDB
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
Is it possible to remove Volo.Abp.Caching.StackExchangeRedis from microservices solution or any alternative implementations?. I have Implemented MondoDb cache for IDistributed cache but it seems like all core module use this package to cache all data.
7 Answer(s)
-
0
hi
This is possible. You can remove all
Volo.Abp.Caching.StackExchangeRedis
packages andAbpCachingStackExchangeRedisModule
from Microservices project.Remove:
using Volo.Abp.Caching.StackExchangeRedis;
context.Services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
-
0
What will be the impact If i remove all references and run multiple instance of same service. I can use azure blob storage for distributed locking.?
-
0
hi
. I have Implemented MondoDb cache for IDistributed cache but it seems like all core module use this package to cache all data.
You can replace this with your implementation
-
0
Do I have replace all Child Modules Code as well ? O just replace IDistributedCache Implementation ?
-
0
hi
You only need to replace them in your Microservices project.
-
0
It seems like when I disable cache . Its still using local cache for each microservice ? PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Saas.Editions [13:11:59 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Saas.Tenants [13:11:59 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Saas.Editions [13:11:59 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Saas.Tenants [13:11:59 DBG] Found in the cache: pn:R,pk:admin,n:Saas.Tenants [13:11:59 DBG] Found in the cache: pn:R,pk:admin,n:Saas.Editions [13:11:59 DBG] Found in the cache: pn:R,pk:admin,n:Saas.Tenants [13:11:59 DBG] Found in the cache: pn:R,pk:admin,n:Saas.Editions [13:11:59 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:WpayConnect_Angular,n:Saas.Editions [13:11:59 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:WpayConnect_Angular,n:Saas.Editions [13:11:59 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:WpayConnect_Angular,n:Saas.Tenants [13:11:59 DBG] Found in the cache: pn:C,pk:WpayConnect_Angular,n:Saas.Editions [13:11:59 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:WpayConnect_Angular,n:Saas.Tenants [13:11:59 DBG] Found in the cache: pn:C,pk:WpayConnect_Angular,n:Saas.Editions [13:11:59 DBG] Found in the cache: pn:C,pk:WpayConnect_Angular,n:Saas.Tenants [13:11:59 DBG] Found in the cache: pn:C,pk:WpayConnect_Angular,n:Saas.Tenants
Above logs from dotnet when no Redis or Mongo cache enabled ? Can you please confirm that's the case ?
-
0
hi
The
MemoryCache
will work after disabling the Redis.context.Services.AddMemoryCache(); context.Services.AddDistributedMemoryCache();