MemoryCacheEntryExtensions.SetSlidingExpiration Metoda

Definice

Nastaví, jak dlouho může být položka mezipaměti neaktivní (např. nepřístupná), než se odebere. Tím se životnost položky neprodlouží nad rámec absolutního 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

Klouzavý čas vypršení platnosti.

Návraty

Aby MemoryCacheEntryOptions bylo možné zřetězovat další volání.

Platí pro