Browse Source

Disable cache error hiding in development environment.

pull/23736/head
maliming 7 months ago
parent
commit
6127e3e8ba
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  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