共用方式為


MemoryCache 建構函式

定義

多載

MemoryCache(IOptions<MemoryCacheOptions>)

建立新的 MemoryCache 執行個體。

MemoryCache(IOptions<MemoryCacheOptions>, ILoggerFactory)

建立新的 MemoryCache 執行個體。

MemoryCache(IOptions<MemoryCacheOptions>)

來源:
MemoryCache.cs
來源:
MemoryCache.cs
來源:
MemoryCache.cs

建立新的 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.cs
來源:
MemoryCache.cs
來源:
MemoryCache.cs

建立新的 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

用來建立記錄器的 Factory。

適用於