Browse Source
Disable cache error hiding in development environment.
pull/23736/head
maliming
7 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
9 additions and
1 deletions
-
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; |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|