public virtual Task UpdateCachedResultAsync <TCacheEntryOptions>(IAsyncCachedQuery <TCacheEntryOptions> executedQuery) { if (executedQuery == null) { throw new ArgumentNullException(nameof(executedQuery)); } return(executedQuery.UpdateCachedResultAsync(GetAsyncQueryCache <TCacheEntryOptions>())); }
/// <inheritdoc cref="IAsyncCacheManager.UpdateCachedResultAsync{TCacheEntryOptions}"/> public virtual Task UpdateCachedResultAsync <TCacheEntryOptions>(IAsyncCachedQuery <TCacheEntryOptions> executedQuery, CancellationToken cancellationToken = default) { if (executedQuery == null) { throw new ArgumentNullException(nameof(executedQuery)); } return(Decorator.Decorate(GetOperationName(executedQuery, nameof(executedQuery.UpdateCachedResult)), () => executedQuery.UpdateCachedResult(GetAsyncCacheStore <TCacheEntryOptions>(), cancellationToken))); }
public virtual Task EvictCachedResultAsync <TCacheEntryOptions>(IAsyncCachedQuery <TCacheEntryOptions> query) { if (query == null) { throw new ArgumentNullException(nameof(query)); } return(query.EvictCachedResultAsync(GetAsyncQueryCache <TCacheEntryOptions>())); }
/// <inheritdoc cref="IAsyncQueryMediary.QueryAsync{TContext,TCacheEntryOptions,TResult}"/> public virtual Task <TResult> QueryAsync <TContext, TCacheEntryOptions, TResult>(IAsyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, TContext context, CacheOption cacheOption, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException(nameof(query)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } return(Decorator.Decorate(GetOperationName(query, nameof(query.Execute)), () => query.Execute(context, GetAsyncCacheStore <TCacheEntryOptions>(), cacheOption, cancellationToken))); }
public virtual Task UpdateCachedResultAsync <TCacheEntryOptions>(IAsyncCachedQuery <TCacheEntryOptions> executedQuery) { return(Invoker.UpdateCachedResultAsync(executedQuery)); }
public virtual Task EvictCachedResultAsync <TCacheEntryOptions>(IAsyncCachedQuery <TCacheEntryOptions> query) { return(Invoker.EvictCachedResultAsync(query)); }
public virtual Task <TResult> QueryAsync <TContext, TResult, TCacheEntryOptions>(IAsyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, CacheOption cacheOption = CacheOption.Default) { return(Invoker.QueryAsync(query, GetContext <TContext>(), cacheOption)); }
public virtual Task <TResult> QueryAsync <TContext, TCacheEntryOptions, TResult>(IAsyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, TContext context, CacheOption cacheOption = CacheOption.Default) { if (query == null) { throw new ArgumentNullException(nameof(query)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } return(query.ExecuteAsync(context, Decorator, GetAsyncQueryCache <TCacheEntryOptions>(), cacheOption)); }
/// <inheritdoc cref="IAsyncCacheManager.UpdateCachedResultAsync{TCacheEntryOptions}"/> public virtual Task UpdateCachedResultAsync <TCacheEntryOptions>(IAsyncCachedQuery <TCacheEntryOptions> executedQuery, CancellationToken cancellationToken = default) => Mediary.UpdateCachedResultAsync(executedQuery, cancellationToken);
/// <inheritdoc cref="IAsyncCacheManager.EvictCachedResultAsync{TCacheEntryOptions}"/> public virtual Task EvictCachedResultAsync <TCacheEntryOptions>(IAsyncCachedQuery <TCacheEntryOptions> query, CancellationToken cancellationToken = default) => Mediary.EvictCachedResultAsync(query, cancellationToken);
/// <inheritdoc cref="IAsyncQueryMagneto.QueryAsync{TContext,TCacheEntryOptions,TResult}"/> public virtual Task <TResult> QueryAsync <TContext, TCacheEntryOptions, TResult>(IAsyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, CacheOption cacheOption, CancellationToken cancellationToken = default) => Mediary.QueryAsync(query, GetContext <TContext>(), cacheOption, cancellationToken);