MetalamaAPI documentationPatterns APIMetalama.​Patterns.​CachingCaching­ServiceGet­From­Cache­Or­Execute­Value­Task­Async
Open sandboxFocus

CachingService.GetFromCacheOrExecuteValueTaskAsync Method

GetFromCacheOrExecuteValueTaskAsync<TTaskResultType>(CachedMethodMetadata, Object, Object[], Func<Object, Object[], CancellationToken, ValueTask<Object>>, CacheItemConfiguration, CancellationToken)

Declaration
public ValueTask<TTaskResultType> GetFromCacheOrExecuteValueTaskAsync<TTaskResultType>(CachedMethodMetadata metadata, object instance, object[] args, Func<object, object[], CancellationToken, ValueTask<object>> func, CacheItemConfiguration configuration = null, CancellationToken cancellationToken = null)
Parameters
Type Name Description
CachedMethodMetadata metadata
System.Object instance
System.Object[] args
System.Func<System.Object, System.Object[], System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<System.Object>> func
CacheItemConfiguration configuration
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.ValueTask<TTaskResultType>
Type Parameters
Name Description
TTaskResultType
Implements
ICachingService.GetFromCacheOrExecuteValueTaskAsync<TTaskResultType>(CachedMethodMetadata, Object, Object[], Func<Object, Object[], CancellationToken, ValueTask<Object>>, CacheItemConfiguration, CancellationToken)