Method SetExpirationHandlerAsync
SetExpirationHandlerAsync<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, ExpirationType, Task<ObjectDisposition>>)
[This method has been deprecated] Sets a callback method for handling expiration events and notifies the ScaleOut service that this client application is available to handle events for the supplied cache instance.
[Obsolete("Use synchronous SetExpirationHandler instead.")]
public static Task SetExpirationHandlerAsync<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, ExpirationType, Task<ObjectDisposition>> callback)
Parameters
cache
Cache<TKey, TValue>The cache that will push expiration events.
callback
Func<TKey, ExpirationType, Task<ObjectDisposition>>Callback that is invoked when an object expires in the ScaleOut service.
Returns
Type Parameters
TKey
The type of keys in the cache.
TValue
The type of values in the cache.