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

ICachingService.GetFromCacheOrExecuteTaskAsync Method

GetFromCacheOrExecuteTaskAsync<TTaskResultType>(CachedMethodMetadata, Object, Object[], Func<Object, Object[], CancellationToken, Task<Object>>, CacheItemConfiguration, CancellationToken)

Declaration
Task<TTaskResultType> GetFromCacheOrExecuteTaskAsync<TTaskResultType>(CachedMethodMetadata metadata, object instance, object[] args, Func<object, object[], CancellationToken, Task<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.Task<System.Object>> func
CacheItemConfiguration configuration
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TTaskResultType>
Type Parameters
Name Description
TTaskResultType