Method SetExpirationHandler
SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, ExpirationType, Task<ObjectDisposition>>)
Sets an async 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.
public static void SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, ExpirationType, Task<ObjectDisposition>> asyncCallback)
Parameters
cacheCache<TKey, TValue>The cache that will push expiration events.
asyncCallbackFunc<TKey, ExpirationType, Task<ObjectDisposition>>Callback that is invoked when an object expires in the ScaleOut service.
Type Parameters
TKeyThe type of keys in the cache.
TValueThe type of values in the cache.
SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, ExpirationType, ObjectDisposition>)
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.
public static void SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, ExpirationType, ObjectDisposition> callback)
Parameters
cacheCache<TKey, TValue>The cache that will push expiration events.
callbackFunc<TKey, ExpirationType, ObjectDisposition>Callback that is invoked when an object expires in the ScaleOut service.
Type Parameters
TKeyThe type of keys in the cache.
TValueThe type of values in the cache.