CacheEntryExtensions.SetAbsoluteExpiration Metodo

Definizione

Overload

SetAbsoluteExpiration(ICacheEntry, DateTimeOffset)

Imposta una data di scadenza assoluta per la voce della cache.Sets an absolute expiration date for the cache entry.

SetAbsoluteExpiration(ICacheEntry, TimeSpan)

Imposta un'ora di scadenza assoluta, relativa al momento attuale.Sets an absolute expiration time, relative to now.

SetAbsoluteExpiration(ICacheEntry, DateTimeOffset)

Imposta una data di scadenza assoluta per la voce della cache.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

Parametri

absolute
DateTimeOffset

Oggetto DateTimeOffset che rappresenta l'ora di scadenza, in termini assoluti.A DateTimeOffset representing the expiration time in absolute terms.

Restituisce

Oggetto ICacheEntry per il concatenamento.The ICacheEntry for chaining.

SetAbsoluteExpiration(ICacheEntry, TimeSpan)

Imposta un'ora di scadenza assoluta, relativa al momento attuale.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

Parametri

relative
TimeSpan

Oggetto TimeSpan che rappresenta l'ora di scadenza, relativa al momento attuale.The TimeSpan representing the expiration time relative to now.

Restituisce

Oggetto ICacheEntry per il concatenamento.The ICacheEntry for chaining.

Si applica a