Språk

MemoryCacheEntryExtensions.SetSlidingExpiration Metod

Definition

Anger hur länge cacheposten kan vara inaktiv (t.ex. inte tillgänglig) innan den tas bort. Detta förlänger inte postens livslängd utöver den absoluta förfallotiden (om den anges).

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

Parametrar

offset
TimeSpan

Den glidande förfallotiden.

Returer

MemoryCacheEntryOptions att ytterligare anrop kan länkas.

Gäller för