MemoryCacheEntryExtensions.AddExpirationToken 方法

定义

如果给定的 IChangeToken 过期,则会使缓存项过期。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Caching::Memory::MemoryCacheEntryOptions ^ AddExpirationToken(Microsoft::Extensions::Caching::Memory::MemoryCacheEntryOptions ^ options, Microsoft::Extensions::Primitives::IChangeToken ^ expirationToken);
public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions AddExpirationToken (this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Primitives.IChangeToken expirationToken);
static member AddExpirationToken : Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions * Microsoft.Extensions.Primitives.IChangeToken -> Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions
<Extension()>
Public Function AddExpirationToken (options As MemoryCacheEntryOptions, expirationToken As IChangeToken) As MemoryCacheEntryOptions

参数

expirationToken
IChangeToken

导致缓存项过期的 IChangeToken

返回

MemoryCacheEntryOptions,以便可以链接其他调用。

适用于