diff --git a/src/blazor/admin/BootstrapAdmin.Caching/Services/DefaultCacheManager.cs b/src/blazor/admin/BootstrapAdmin.Caching/Services/DefaultCacheManager.cs index 348dbd51..71d013b0 100644 --- a/src/blazor/admin/BootstrapAdmin.Caching/Services/DefaultCacheManager.cs +++ b/src/blazor/admin/BootstrapAdmin.Caching/Services/DefaultCacheManager.cs @@ -57,9 +57,12 @@ class DefaultCacheManager : ICacheManager // 内置缓存策略 缓存相对时间 10 分钟 if (entry.AbsoluteExpiration == null && entry.SlidingExpiration == null && !entry.ExpirationTokens.Any()) { +#if DEBUG + entry.SlidingExpiration = TimeSpan.FromMilliseconds(100); +#else entry.SlidingExpiration = TimeSpan.FromMinutes(10); +#endif } - entry.RegisterPostEvictionCallback((key, value, reason, state) => {