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
cache
Cache<TKey, TValue>The cache that will push posted events to this handler.
asyncCallback
Func<TKey, EventPayload, Task>Async callback that handles posted events.
Type Parameters
TKey
The type of keys in the cache.
TValue
The 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
cache
Cache<TKey, TValue>The cache that will push posted events to this handler.
callback
Action<TKey, EventPayload>Callback that handles posted events.
Type Parameters
TKey
The type of keys in the cache.
TValue
The type of values in the cache.
- See Also