DistributedCacheEntryExtensions.SetSlidingExpiration Methode

Definition

Legt fest, wie lange der Cacheeintrag inaktiv sein kann (z. B. nicht darauf zugegriffen), bevor er entfernt wird. Dadurch wird die Eintragsdauer nicht über den absoluten Ablauf hinaus verlängert (sofern festgelegt).

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

Parameter

options
DistributedCacheEntryOptions

Die zu betreibenden Optionen.

offset
TimeSpan

Die gleitende Ablaufzeit.

Gibt zurück

Gilt für: