CacheEntryExtensions.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(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
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
- entry
- ICacheEntry
The ICacheEntry.
- 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
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
- entry
- ICacheEntry
The ICacheEntry.
Returns
The ICacheEntry for chaining.
Applies to
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.