feat: 增加 Debug 模式下禁用 Caching 设置
This commit is contained in:
parent
7411047ea3
commit
41e94ca677
|
@ -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) =>
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue