MemoryCacheEntryExtensions.SetAbsoluteExpiration Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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
- options
- MemoryCacheEntryOptions
- absolute
- DateTimeOffset
The expiration time, in absolute terms.
Returns
The MemoryCacheEntryOptions so that additional calls can be chained.
Applies to
SetAbsoluteExpiration(MemoryCacheEntryOptions, TimeSpan)
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
- options
- MemoryCacheEntryOptions
- relative
- TimeSpan
The expiration time, relative to now.
Returns
The MemoryCacheEntryOptions so that additional calls can be chained.