DistributedCacheEntryExtensions.SetSlidingExpiration Método

Definição

Define quanto tempo a entrada da cache pode estar inativa (por exemplo, não acedida) antes de ser removida. Isto não prolongará a vida útil da entrada para além da expiração absoluta (se for definida).

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

Parâmetros

options
DistributedCacheEntryOptions

As opções a operar.

offset
TimeSpan

O tempo de validade deslizante.

Devoluções

Aplica-se a