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
cacheCache<TKey, TValue>The cache that will push expiration events.
callbackFunc<TKey, ExpirationType, Task<ObjectDisposition>>Callback that is invoked when an object expires in the ScaleOut service.
Returns
Type Parameters
TKeyThe type of keys in the cache.
TValueThe type of values in the cache.