Skip to content

Commit b016901

Browse files
authored
Merge pull request #23736 from abpframework/AbpDistributedCacheOptions-HideErrors
Disable cache error hiding in development environment.
2 parents a194789 + 47c303a commit b016901

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,17 @@ public override void ConfigureServices(ServiceConfigurationContext context)
3030
context.Services.AddSingleton(typeof(IHybridCache<>), typeof(AbpHybridCache<>));
3131
context.Services.AddSingleton(typeof(IHybridCache<,>), typeof(AbpHybridCache<,>));
3232

33-
context.Services.Configure<AbpDistributedCacheOptions>(cacheOptions =>
33+
Configure<AbpDistributedCacheOptions>(cacheOptions =>
3434
{
3535
cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20);
3636
});
37+
38+
if (context.Services.GetAbpHostEnvironment().IsDevelopment())
39+
{
40+
Configure<AbpDistributedCacheOptions>(options =>
41+
{
42+
options.HideErrors = false;
43+
});
44+
}
3745
}
3846
}

0 commit comments

Comments
 (0)