Method SetEraseObjectHandlerAsync
SetEraseObjectHandlerAsync<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, Task>)
[This method has been deprecated] Sets a callback method for handling erase-behind events. The object provided to the callback should be removed from a persistent backing store.
[Obsolete("Use synchronous SetEraseObjectHandler instead.")]
public static Task SetEraseObjectHandlerAsync<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, Task> callback)
Parameters
cache
Cache<TKey, TValue>The cache that will push erase-behind events.
callback
Func<TKey, Task>Callback that removes the provided object from a backing store.
Returns
Type Parameters
TKey
TValue