Condividi tramite


DistributedCacheEntryExtensions.SetSlidingExpiration Metodo

Definizione

Imposta l'intervallo di tempo per cui una voce della cache può essere inattiva (ad esempio non avere accessi) prima che venga rimossa. Questo valore non estende 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 eseguire le operazioni.

offset
TimeSpan

Ora di scadenza variabile.

Restituisce

Si applica a