Jazyk

MemoryCacheEntryExtensions.SetSlidingExpiration Metoda

Definice

Nastaví, jak dlouho může být položka mezipaměti neaktivní (např. není přístupná), než se odebere. Tím se doba platnosti položky neprodlouží po absolutním vypršení platnosti (pokud je nastavená).

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

Parametry

offset
TimeSpan

Doba klouzavého vypršení platnosti.

Návraty

Další MemoryCacheEntryOptions volání je možné zřetězit.

Platí pro