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

CachingService.GetFromCacheOrExecute Method

GetFromCacheOrExecute<TResult>(CachedMethodMetadata, Object, Object[], Func<Object, Object[], Object>, CacheItemConfiguration, CancellationToken)

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