UpdateTimeToLive Method
UpdateTimeToLive(TKey, TimeSpan)
Updates the time-to-live of an entry.
Declaration
Task<bool> UpdateTimeToLive(TKey key, TimeSpan timeToLive)
Parameters
TKey | key | A key. |
TimeSpan | timeToLive | A time to live (0ms to live forever; -1ms to use the server-configured value). |
Returns
Task<Boolean> |
|
Remarks
The value is automatically expired, evicted and removed after the
timeToLive
has elapsed. If timeToLive
is
The new time-to-live value is valid starting from the time this operation is invoked, not since the time the entry was created.
If the entry does not exist or is already expired, this call has no effect.
If there is no entry with key key
or is already expired,
this call makes no changes to entries stored in this dictionary.
Time resolution for is seconds. The given value is rounded to the next closest second value.