DistributedCacheEntryExtensions.SetSlidingExpiration Metod

Definition

Anger hur länge cacheposten kan vara inaktiv (till exempel inte nås) 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::Distributed::DistributedCacheEntryOptions ^ SetSlidingExpiration(Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options, TimeSpan offset);
public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetSlidingExpiration(this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, TimeSpan offset);
static member SetSlidingExpiration : Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * TimeSpan -> Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions
<Extension()>
Public Function SetSlidingExpiration (options As DistributedCacheEntryOptions, offset As TimeSpan) As DistributedCacheEntryOptions

Parametrar

options
DistributedCacheEntryOptions

De alternativ som ska köras på.

offset
TimeSpan

Den glidande förfallotiden.

Returer

Gäller för