Dela via


DistributedCacheEntryExtensions.SetAbsoluteExpiration Method

Definition

Overloads

SetAbsoluteExpiration(DistributedCacheEntryOptions, DateTimeOffset)

Sets an absolute expiration date for the cache entry.

SetAbsoluteExpiration(DistributedCacheEntryOptions, TimeSpan)

Sets an absolute expiration time, relative to now.

SetAbsoluteExpiration(DistributedCacheEntryOptions, DateTimeOffset)

Source:
DistributedCacheEntryExtensions.cs
Source:
DistributedCacheEntryExtensions.cs
Source:
DistributedCacheEntryExtensions.cs

Sets an absolute expiration date for the cache entry.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ SetAbsoluteExpiration(Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options, DateTimeOffset absolute);
public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetAbsoluteExpiration (this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, DateTimeOffset absolute);
static member SetAbsoluteExpiration : Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * DateTimeOffset -> Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions
<Extension()>
Public Function SetAbsoluteExpiration (options As DistributedCacheEntryOptions, absolute As DateTimeOffset) As DistributedCacheEntryOptions

Parameters

options
DistributedCacheEntryOptions

The options to be operated on.

absolute
DateTimeOffset

The expiration time, in absolute terms.

Returns

Applies to

SetAbsoluteExpiration(DistributedCacheEntryOptions, TimeSpan)

Source:
DistributedCacheEntryExtensions.cs
Source:
DistributedCacheEntryExtensions.cs
Source:
DistributedCacheEntryExtensions.cs

Sets an absolute expiration time, relative to now.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ SetAbsoluteExpiration(Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options, TimeSpan relative);
public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetAbsoluteExpiration (this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, TimeSpan relative);
static member SetAbsoluteExpiration : Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * TimeSpan -> Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions
<Extension()>
Public Function SetAbsoluteExpiration (options As DistributedCacheEntryOptions, relative As TimeSpan) As DistributedCacheEntryOptions

Parameters

options
DistributedCacheEntryOptions

The options to be operated on.

relative
TimeSpan

The expiration time, relative to now.

Returns

Applies to