From 6127e3e8baa26f7b6eef834333dee076bdf15343 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Sep 2025 14:24:11 +0800 Subject: [PATCH] Disable cache error hiding in development environment. --- .../Volo/Abp/Caching/AbpCachingModule.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs index 632bfa416e8..15a425105bc 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs @@ -30,9 +30,17 @@ public override void ConfigureServices(ServiceConfigurationContext context) context.Services.AddSingleton(typeof(IHybridCache<>), typeof(AbpHybridCache<>)); context.Services.AddSingleton(typeof(IHybridCache<,>), typeof(AbpHybridCache<,>)); - context.Services.Configure(cacheOptions => + Configure(cacheOptions => { cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20); }); + + if (context.Services.GetAbpHostEnvironment().IsDevelopment()) + { + Configure(options => + { + options.HideErrors = false; + }); + } } }