CacheEntryExtensions.AddExpirationToken(ICacheEntry, IChangeToken) 方法

定义

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

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

参数

expirationToken
IChangeToken

导致缓存项过期的 IChangeToken

返回

用于链接的 ICacheEntry

适用于