Table of Contents

Method SetStoreObjectHandler

Namespace
Scaleout.Client
Assembly
Scaleout.Client.dll

SetStoreObjectHandler<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, TValue, Task>)

Sets an async callback method for handling write-behind events. The object provided to the callback should be stored in a persistent backing store.

public static void SetStoreObjectHandler<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, TValue, Task> asyncCallback)

Parameters

cache Cache<TKey, TValue>

The cache that will push write-behind events.

asyncCallback Func<TKey, TValue, Task>

Callback that writes the provided object to a backing store.

Type Parameters

TKey

The type of keys in the cache.

TValue

The type of values in the cache.

SetStoreObjectHandler<TKey, TValue>(Cache<TKey, TValue>, Action<TKey, TValue>)

Sets a callback method for handling write-behind events. The object provided to the callback should be stored in a persistent backing store.

public static void SetStoreObjectHandler<TKey, TValue>(Cache<TKey, TValue> cache, Action<TKey, TValue> callback)

Parameters

cache Cache<TKey, TValue>

The cache that will push write-behind events.

callback Action<TKey, TValue>

Callback that writes the provided object to a backing store.

Type Parameters

TKey

The type of keys in the cache.

TValue

The type of values in the cache.