ICachingService Interface
Front-end interface used by the caching aspects.
Namespace: Metalama.Patterns.Caching
Assembly: Metalama.Patterns.Caching.dll
Syntax
public interface ICachingService
Properties
Name | Description |
---|---|
AllBackends | |
KeyBuilder | |
Logger |
Methods
Name | Description |
---|---|
GetFromCacheOrExecute<TResult>(CachedMethodMetadata, Object, Object[], Func<Object, Object[], Object>, CacheItemConfiguration, CancellationToken) | |
GetFromCacheOrExecuteTaskAsync<TTaskResultType>(CachedMethodMetadata, Object, Object[], Func<Object, Object[], CancellationToken, Task<Object>>, CacheItemConfiguration, CancellationToken) | |
GetFromCacheOrExecuteValueTaskAsync<TTaskResultType>(CachedMethodMetadata, Object, Object[], Func<Object, Object[], CancellationToken, ValueTask<Object>>, CacheItemConfiguration, CancellationToken) | |
InitializeAsync(CancellationToken) | Initializes the caching service. It is recommended to call this method from the start-up program sequence when the back-end involves a network or out-of-process service (e.g. Redis, Azure). If this method is not called, initialization will occur automatically upon the first call any cached method. |