SqlServerCacheOptions 类

定义

SqlServerCache 的配置选项。Configuration options for SqlServerCache.

public ref class SqlServerCacheOptions : Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Caching::SqlServer::SqlServerCacheOptions ^>
public class SqlServerCacheOptions : Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.SqlServer.SqlServerCacheOptions>
type SqlServerCacheOptions = class
    interface IOptions<SqlServerCacheOptions>
Public Class SqlServerCacheOptions
Implements IOptions(Of SqlServerCacheOptions)
继承
SqlServerCacheOptions
实现

构造函数

SqlServerCacheOptions()

属性

ConnectionString

用于连接到数据库的连接字符串。The connection string to the database.

DefaultSlidingExpiration

如果未显式设置 Absolute 或 SlidingExpiration,则为针对缓存项设置的默认可调过期时间。The default sliding expiration set for a cache entry if neither Absolute or SlidingExpiration has been set explicitly. 默认为 20 分钟。By default, its 20 minutes.

ExpiredItemsDeletionInterval

扫描和删除缓存中的过期项的周期性间隔。The periodic interval to scan and delete expired items in the cache. 默认值为 30 分钟。Default is 30 minutes.

SchemaName

表的架构名称。The schema name of the table.

SystemClock

表示计算机时钟,以启用单元测试的抽象。An abstraction to represent the clock of a machine in order to enable unit testing.

TableName

存储缓存项的表的名称。Name of the table where the cache items are stored.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

显式接口实现

IOptions<SqlServerCacheOptions>.Value

获取默认的已配置的 TOptions 实例。Gets the default configured TOptions instance.

适用于