Delen via


CacheEntryExtensions.SetAbsoluteExpiration Method

Definition

Overloads

SetAbsoluteExpiration(ICacheEntry, DateTimeOffset)

Sets an absolute expiration date for the cache entry.

SetAbsoluteExpiration(ICacheEntry, TimeSpan)

Sets an absolute expiration time, relative to now.

SetAbsoluteExpiration(ICacheEntry, DateTimeOffset)

Source:
CacheEntryExtensions.cs
Source:
CacheEntryExtensions.cs
Source:
CacheEntryExtensions.cs
Source:
CacheEntryExtensions.cs

Sets an absolute expiration date for the cache entry.

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

Parameters

absolute
DateTimeOffset

A DateTimeOffset representing the expiration time in absolute terms.

Returns

The ICacheEntry for chaining.

Applies to

SetAbsoluteExpiration(ICacheEntry, TimeSpan)

Source:
CacheEntryExtensions.cs
Source:
CacheEntryExtensions.cs
Source:
CacheEntryExtensions.cs
Source:
CacheEntryExtensions.cs

Sets an absolute expiration time, relative to now.

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

Parameters

relative
TimeSpan

The TimeSpan representing the expiration time relative to now.

Returns

The ICacheEntry for chaining.

Applies to