Megosztás a következőn keresztül:


DistributedCacheEntryExtensions.SetSlidingExpiration Method

Definition

Sets how long the cache entry can be inactive (e.g. not accessed) before it will be removed. This will not extend the entry lifetime beyond the absolute expiration (if set).

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

Parameters

options
DistributedCacheEntryOptions

The options to be operated on.

offset
TimeSpan

The sliding expiration time.

Returns

Applies to