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

用於鏈結的 ICacheEntry

適用於