Skip to content

Commit 443f379

Browse files
committed
feat: 增加 CacheManagerOptions 配置类
1 parent d4adda1 commit 443f379

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License
3+
// See the LICENSE file in the project root for more information.
4+
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
5+
6+
namespace BootstrapBlazor.Components;
7+
8+
/// <summary>
9+
/// CacheManagerOptions 配置类
10+
/// </summary>
11+
public class CacheManagerOptions
12+
{
13+
/// <summary>
14+
/// 获得/设置 是否开启 CacheManager 功能 默认 true 开启
15+
/// </summary>
16+
public bool Enable { get; set; } = true;
17+
18+
/// <summary>
19+
/// 获得/设置 滑动缓存过期时间 默认 5 分钟
20+
/// </summary>
21+
public TimeSpan SlidingExpiration { get; set; } = TimeSpan.FromMinutes(5);
22+
23+
/// <summary>
24+
/// 获得/设置 绝对缓存过期时间 默认 10 秒钟
25+
/// </summary>
26+
public TimeSpan AbsoluteExpiration { get; set; } = TimeSpan.FromSeconds(10);
27+
}

0 commit comments

Comments
 (0)