Method SetPostedEventHandler
SetPostedEventHandler<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, EventPayload, Task>)
Sets an async callback method for handling posted events.
public static void SetPostedEventHandler<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, EventPayload, Task> asyncCallback)
Parameters
cacheCache<TKey, TValue>The cache that will push posted events to this handler.
asyncCallbackFunc<TKey, EventPayload, Task>Async callback that handles posted events.
Type Parameters
TKeyThe type of keys in the cache.
TValueThe type of values in the cache.
- See Also
SetPostedEventHandler<TKey, TValue>(Cache<TKey, TValue>, Action<TKey, EventPayload>)
Sets a callback method for handling posted events.
public static void SetPostedEventHandler<TKey, TValue>(Cache<TKey, TValue> cache, Action<TKey, EventPayload> callback)
Parameters
cacheCache<TKey, TValue>The cache that will push posted events to this handler.
callbackAction<TKey, EventPayload>Callback that handles posted events.
Type Parameters
TKeyThe type of keys in the cache.
TValueThe type of values in the cache.
- See Also