Jagamisviis:


MemoryCacheEntryExtensions.SetAbsoluteExpiration Method

Definition

Overloads

SetAbsoluteExpiration(MemoryCacheEntryOptions, DateTimeOffset)

Sets an absolute expiration date for the cache entry.

SetAbsoluteExpiration(MemoryCacheEntryOptions, TimeSpan)

Sets an absolute expiration time, relative to now.

SetAbsoluteExpiration(MemoryCacheEntryOptions, DateTimeOffset)

Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs

Sets an absolute expiration date for the cache entry.

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

Parameters

absolute
DateTimeOffset

The expiration time, in absolute terms.

Returns

The MemoryCacheEntryOptions so that additional calls can be chained.

Applies to

SetAbsoluteExpiration(MemoryCacheEntryOptions, TimeSpan)

Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs

Sets an absolute expiration time, relative to now.

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

Parameters

relative
TimeSpan

The expiration time, relative to now.

Returns

The MemoryCacheEntryOptions so that additional calls can be chained.

Applies to