MemoryCacheEntryExtensions.SetSlidingExpiration Yöntem

Tanım

Önbellek girişinin kaldırılmadan önce ne kadar süreyle devre dışı bırakılacağını (örn. erişilmediğini) ayarlar. Bu, girdi ömrünü mutlak süre sonunun (ayarlandıysa) ötesine uzatmaz.

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

Parametreler

offset
TimeSpan

Kayan süre sonu süresi.

Döndürülenler

MemoryCacheEntryOptions ek çağrıların zincirlenebilmesi için.

Şunlara uygulanır