/// <summary>
 /// EFCachePolicy Parser Utils
 /// </summary>
 public EFCachePolicyParser(
     IOptions <CacheAllQueriesOptions> cacheAllQueriesOptions,
     IEFCacheDependenciesProcessor cacheDependenciesProcessor)
 {
     _cacheAllQueriesOptions     = cacheAllQueriesOptions?.Value;
     _cacheDependenciesProcessor = cacheDependenciesProcessor;
 }
 /// <summary>
 /// EFCachePolicy Parser Utils
 /// </summary>
 public EFCachePolicyParser(
     IOptions <EFCoreSecondLevelCacheSettings> cacheSettings,
     IEFCacheDependenciesProcessor cacheDependenciesProcessor,
     IEFDebugLogger logger)
 {
     _cacheSettings = cacheSettings?.Value;
     _cacheDependenciesProcessor = cacheDependenciesProcessor;
     _logger = logger;
 }
コード例 #3
0
 /// <summary>
 /// A custom cache key provider for EF queries.
 /// </summary>
 public EFCacheKeyProvider(
     IEFCacheDependenciesProcessor cacheDependenciesProcessor,
     IEFCachePolicyParser cachePolicyParser,
     IEFDebugLogger logger)
 {
     _cacheDependenciesProcessor = cacheDependenciesProcessor;
     _logger            = logger;
     _cachePolicyParser = cachePolicyParser;
 }
        /// <summary>
        /// A custom cache key provider for EF queries.
        /// </summary>
        public EFCacheKeyProvider(
            IEFCacheDependenciesProcessor cacheDependenciesProcessor,
            IEFCachePolicyParser cachePolicyParser,
            IEFDebugLogger logger, IOptions <EFCoreSecondLevelCacheSettings> cacheSettings)
        {
            _cacheDependenciesProcessor = cacheDependenciesProcessor;
            _logger            = logger;
            _cachePolicyParser = cachePolicyParser;
#pragma warning disable CA1062 // Validate arguments of public methods
            _keyPrefix = cacheSettings.Value.CacheKeyPrefix;
#pragma warning restore CA1062 // Validate arguments of public methods
        }
 /// <summary>
 /// Helps processing SecondLevelCacheInterceptor
 /// </summary>
 public DbCommandInterceptorProcessor(
     IEFCacheServiceProvider cacheService,
     IEFCacheDependenciesProcessor cacheDependenciesProcessor,
     IEFCacheKeyProvider cacheKeyProvider,
     IEFCachePolicyParser cachePolicyParser,
     ILogger <DbCommandInterceptorProcessor> logger)
 {
     _cacheService = cacheService;
     _cacheDependenciesProcessor = cacheDependenciesProcessor;
     _cacheKeyProvider           = cacheKeyProvider;
     _cachePolicyParser          = cachePolicyParser;
     _logger = logger;
 }
コード例 #6
0
 /// <summary>
 /// Helps processing SecondLevelCacheInterceptor
 /// </summary>
 public DbCommandInterceptorProcessor(
     IEFDebugLogger logger,
     IEFCacheServiceProvider cacheService,
     IEFCacheDependenciesProcessor cacheDependenciesProcessor,
     IEFCacheKeyProvider cacheKeyProvider,
     IEFCachePolicyParser cachePolicyParser,
     IEFSqlCommandsProcessor sqlCommandsProcessor)
 {
     _cacheService = cacheService;
     _cacheDependenciesProcessor = cacheDependenciesProcessor;
     _cacheKeyProvider           = cacheKeyProvider;
     _cachePolicyParser          = cachePolicyParser;
     _logger = logger;
     _sqlCommandsProcessor = sqlCommandsProcessor;
 }
        /// <summary>
        /// A custom cache key provider for EF queries.
        /// </summary>
        public EFCacheKeyProvider(
            IEFCacheDependenciesProcessor cacheDependenciesProcessor,
            IEFCachePolicyParser cachePolicyParser,
            IEFDebugLogger logger,
            IOptions <EFCoreSecondLevelCacheSettings> cacheSettings)
        {
            _cacheDependenciesProcessor = cacheDependenciesProcessor;
            _logger            = logger;
            _cachePolicyParser = cachePolicyParser;

            if (cacheSettings == null)
            {
                throw new ArgumentNullException(nameof(cacheSettings));
            }

            _cacheSettings = cacheSettings.Value;
        }
        /// <summary>
        /// Helps processing SecondLevelCacheInterceptor
        /// </summary>
        public DbCommandInterceptorProcessor(
            IEFDebugLogger logger,
            IEFCacheServiceProvider cacheService,
            IEFCacheDependenciesProcessor cacheDependenciesProcessor,
            IEFCacheKeyProvider cacheKeyProvider,
            IEFCachePolicyParser cachePolicyParser,
            IEFSqlCommandsProcessor sqlCommandsProcessor,
            IOptions <EFCoreSecondLevelCacheSettings> cacheSettings)
        {
            _cacheService = cacheService;
            _cacheDependenciesProcessor = cacheDependenciesProcessor;
            _cacheKeyProvider           = cacheKeyProvider;
            _cachePolicyParser          = cachePolicyParser;
            _logger = logger;
            _sqlCommandsProcessor = sqlCommandsProcessor;

            if (cacheSettings == null)
            {
                throw new ArgumentNullException(nameof(cacheSettings));
            }

            _cacheSettings = cacheSettings.Value;
        }