/// <summary>
 /// 默认的基于ActionFilter的缓存过滤Filter
 /// </summary>
 /// <param name="context"></param>
 /// <param name="executingLockPool"></param>
 /// <param name="cachingDiagnosticsAccessor"></param>
 public DefaultLockedActionCacheFilter(ResponseCachingContext context,
                                       IExecutingLockPool <ResponseCacheEntry> executingLockPool,
                                       CachingDiagnosticsAccessor cachingDiagnosticsAccessor)
     : base(context, cachingDiagnosticsAccessor)
 {
     _executingLockPool = executingLockPool ?? throw new ArgumentNullException(nameof(executingLockPool));
 }
Exemple #2
0
 /// <summary>
 /// CacheFilter基类
 /// </summary>
 /// <param name="context"></param>
 /// <param name="cachingDiagnosticsAccessor"></param>
 public CacheFilterBase(ResponseCachingContext context, CachingDiagnosticsAccessor cachingDiagnosticsAccessor)
 {
     Context = context ?? throw new ArgumentNullException(nameof(context));
     _cachingDiagnosticsAccessor = cachingDiagnosticsAccessor;
     CachingDiagnostics          = _cachingDiagnosticsAccessor.CachingDiagnostics;
     Logger                  = CachingDiagnostics.Logger;
     ResponseCache           = Context.ResponseCache;
     _onCacheStoringDelegate = InternalStoreCacheAsync;
 }
 /// <summary>
 /// 默认的基于ResourceFilter的缓存过滤Filter
 /// </summary>
 /// <param name="context"></param>
 /// <param name="cachingDiagnosticsAccessor"></param>
 public DefaultResourceCacheFilter(ResponseCachingContext context,
                                   CachingDiagnosticsAccessor cachingDiagnosticsAccessor)
     : base(context, cachingDiagnosticsAccessor)
 {
 }