Browse Source

Merge pull request #23736 from abpframework/AbpDistributedCacheOptions-HideErrors

Disable cache error hiding in development environment.
pull/23785/head
Halil İbrahim Kalkan 1 year ago
committed by GitHub
parent
commit
b016901b7b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs

10
framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs

@ -30,9 +30,17 @@ public class AbpCachingModule : AbpModule
context.Services.AddSingleton(typeof(IHybridCache<>), typeof(AbpHybridCache<>));
context.Services.AddSingleton(typeof(IHybridCache<,>), typeof(AbpHybridCache<,>));
context.Services.Configure<AbpDistributedCacheOptions>(cacheOptions =>
Configure<AbpDistributedCacheOptions>(cacheOptions =>
{
cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20);
});
if (context.Services.GetAbpHostEnvironment().IsDevelopment())
{
Configure<AbpDistributedCacheOptions>(options =>
{
options.HideErrors = false;
});
}
}
}

Loading…
Cancel
Save