MemoryCache 构造函数

定义

重载

MemoryCache(IOptions<MemoryCacheOptions>)

创建一个新的 MemoryCache 实例。

MemoryCache(IOptions<MemoryCacheOptions>, ILoggerFactory)

创建一个新的 MemoryCache 实例。

MemoryCache(IOptions<MemoryCacheOptions>)

创建一个新的 MemoryCache 实例。

public:
 MemoryCache(Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Caching::Memory::MemoryCacheOptions ^> ^ optionsAccessor);
public MemoryCache (Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> optionsAccessor);
new Microsoft.Extensions.Caching.Memory.MemoryCache : Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> -> Microsoft.Extensions.Caching.Memory.MemoryCache
Public Sub New (optionsAccessor As IOptions(Of MemoryCacheOptions))

参数

optionsAccessor
IOptions<MemoryCacheOptions>

缓存的选项。

适用于

MemoryCache(IOptions<MemoryCacheOptions>, ILoggerFactory)

创建一个新的 MemoryCache 实例。

public:
 MemoryCache(Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Caching::Memory::MemoryCacheOptions ^> ^ optionsAccessor, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public MemoryCache (Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.Extensions.Caching.Memory.MemoryCache : Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Caching.Memory.MemoryCache
Public Sub New (optionsAccessor As IOptions(Of MemoryCacheOptions), loggerFactory As ILoggerFactory)

参数

optionsAccessor
IOptions<MemoryCacheOptions>

缓存的选项。

loggerFactory
ILoggerFactory

用于创建记录器的工厂。

适用于