DistributedCacheEntryExtensions.SetSlidingExpiration Metodo

Definizione

Imposta per quanto tempo la voce della cache può essere inattiva (ad esempio, non accessibile) prima che venga rimossa. Questa operazione non estenderà la durata della voce oltre la scadenza assoluta (se impostata).

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

Parametri

options
DistributedCacheEntryOptions

Opzioni su cui operare.

offset
TimeSpan

Ora di scadenza scorrevole.

Valori restituiti

Si applica a