PutAsync Method
PutAsync(TKey, TValue)
Sets (adds or updates) an entry, and returns the previous value, if any.
Declaration
Task<TValue> PutAsync(TKey key, TValue value)
Parameters
TKey | key | The key. |
TValue | value | The value. |
Returns
Task<TValue> | The previous value for the specified key, if any; otherwise |
PutAsync(TKey, TValue, TimeSpan)
Declaration
Task<TValue> PutAsync(TKey key, TValue value, TimeSpan timeToLive)
Parameters
TKey | key | |
TValue | value | |
TimeSpan | timeToLive |
Returns
Task<TValue> |