Method SetLoadObjectHandlerAsync
SetLoadObjectHandlerAsync<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, Task<ValueFactoryResult<TValue>>>)
[This method has been deprecated] Sets a callback method for handling read-through or refresh-ahead events. The object returned from the callback is loaded into the ScaleOut service.
[Obsolete("Use synchronous SetLoadObjectHandler instead.")]
public static Task SetLoadObjectHandlerAsync<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, Task<ValueFactoryResult<TValue>>> valueFactory)
Parameters
cache
Cache<TKey, TValue>The cache that will push read-through events.
valueFactory
Func<TKey, Task<ValueFactoryResult<TValue>>>Callback that returns an object to be stored in the ScaleOut service.
Returns
Type Parameters
TKey
TValue