public CacheService(IMemoryCache memoryCache, IDistributedCacheService distributedCache, IOptions <CacheSettings> cacheSettings) { _localCache = memoryCache; _distributedCache = distributedCache; _cacheSettings = cacheSettings.Value; }
public GetActiveDrawingHandler(IDrawingRepository drawingRepository, IMapper mapper, IDistributedCacheService distributedCacheService) { _drawingRepository = drawingRepository; _mapper = mapper; _distributedCacheService = distributedCacheService; }
public UserInfoService(ISecurityDbContext dbcontext, IDistributedCacheService cacheService, IHttpContextAccessor httpContextAccessor, IConfiguration confguration) { CacheService = cacheService; HttpContextAccessor = httpContextAccessor; DbContext = dbcontext; Configuration = confguration; }
public ClientService(OAuthContext context, IConfiguration configuration, IOptions <TenantConfig> tenantConfig, IWebHostEnvironment hostingEnvironment, IPasswordHasher <User> passwordHasher, ProxyService proxyService, IDistributedCacheService distributedCache) { _context = context; _clients = context.Clients; _clientConfiguration = context.ClientConfigurations; _user = context.Users; _userClient = context.UserClients; _passwordHasher = passwordHasher; _configuration = configuration; _tenantConfig = tenantConfig.Value; _hostingEnvironment = hostingEnvironment; _proxyService = proxyService; _distributedCache = distributedCache; }
public GraphQLHttpMiddleware(ILogger <GraphQLHttpMiddleware <TSchema> > logger, RequestDelegate next, PathString path, IDistributedCacheService distributedCache) { _logger = logger; _next = next; _path = path; _distributedCache = distributedCache; }
public CacheBuilder WithRedisConfiguration(RedisConfiguration configuration) { var config = RedisConfigurationHelper.RedisConfigurationMapping(configuration); _distributedCacheService = new RedisCacheService(ConnectionMultiplexer.Connect(config)); return(this); }
public DistributedCacheServiceTests(TestFunctionsFixture testFunctions) { _testFunctions = testFunctions; var options = new OptionsWrapper <MemoryDistributedCacheOptions>(new MemoryDistributedCacheOptions()); _memoryDistributedCache = new MemoryDistributedCache(options); _distributedCacheService = new DistributedCacheService(_memoryDistributedCache); }
/// <summary> /// Initializes a new instance of the <see cref="ProductsService"/> class. /// </summary> /// <param name="httpClientFactory">The HTTP Client factory.</param> /// <param name="applicationSettings">The application settings.</param> /// <param name="autoMapper">The mapper.</param> /// <param name="cacheService">cache service.</param> public ProductsService(IHttpClientFactory httpClientFactory, IOptions <ApplicationSettings> applicationSettings, IMapper autoMapper, IDistributedCacheService cacheService) { NotNullValidator.ThrowIfNull(applicationSettings, nameof(applicationSettings)); IHttpClientFactory httpclientFactory = httpClientFactory; this.applicationSettings = applicationSettings; this.httpClient = httpclientFactory.CreateClient(); this.autoMapper = autoMapper; this.cacheService = cacheService; }
public TenantFactory(IDistributedCacheService distributedCache, IConfiguration configuration, IOptions <TenantConfig> tenantConfig, IPasswordHasher <User> passwordHasher) { _distributedCache = distributedCache; _configuration = configuration; dbContextOptionsBuilders = new ConcurrentDictionary <string, DbContextOptionsBuilder <DbContextDefault> >(); _tenantConfig = tenantConfig.Value; _passwordHasher = passwordHasher; }
public WeatherForecastService(IDistributedCacheService distributedCacheService) { _distributedCacheService = distributedCacheService; }
/// <summary> /// Creates a DistributedCacheEntryOptions set to expire on a given timespan from now /// </summary> /// <param name="distributedCacheService">Not used only present to bring the extension method in an easy place</param> /// <param name="cacheTime">The time from now the cache time will expire</param> /// <returns></returns> public static DistributedCacheEntryOptions AbsoluteExpirationOption(this IDistributedCacheService _, TimeSpan cacheTime) { return(new DistributedCacheEntryOptions().SetAbsoluteExpiration(cacheTime)); }
public DrawingService(IDrawingRepository drawingRepository, IDistributedCacheService distributedCacheService) { _drawingRepository = drawingRepository; _distributedCacheService = distributedCacheService; }
public CatalogController(IMediator mediator, IDistributedCacheService cacheService, ILogger <CatalogController> logger) { _mediator = mediator; _cacheService = cacheService; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="DistributedCacheFilter"/> class. /// </summary> /// <param name="cache">The cache.</param> /// <param name="expirationTime">The expiration time.</param> public DistributedCacheFilter(IDistributedCacheService cache, TimeSpan expirationTime) { this.cache = cache; this.expirationTime = expirationTime; }
public CacheService(IMemoryCacheService memoryCache, IDistributedCacheService distributedCache) { this.memoryCache = memoryCache; this.distributedCache = distributedCache; }
public UserDiklzInfoService(ISecurityDbContext dbcontext, IDistributedCacheService cacheService, IHttpContextAccessor httpContextAccessor, IConfiguration confguration) : base(dbcontext, cacheService, httpContextAccessor, confguration) { }
public void SetCache(IDistributedCacheService cache) { _cache = cache; }
public BatchAcceptedStudents(IDistributedCacheService cacheService) { _cacheService = cacheService; }
public EntityStateHelper(ICommonDataService dataService, IDistributedCacheService cacheService) { DataService = dataService; CacheService = cacheService; }
public StudentInfoAggregator(IDistributedCacheService cacheService, ICoursesService coursesService, IStatisticsService statisticsService) { _cacheService = cacheService; _coursesService = coursesService; _statisticsService = statisticsService; }
public PlayerTransferService(HttpClient httpClient, IDistributedCacheService distributedCacheService) { _distributedCacheService = distributedCacheService; _httpClient = httpClient; }
public HomeController(IPieRepository pieRepository, ILogger <HomeController> logger, IDistributedCacheService distributedCacheService) { _pieRepository = pieRepository; _logger = logger; _distributedCacheService = distributedCacheService; }
public DistributedCacheServiceTests(TestFunctionsFixture testFunctions) { _testFunctions = testFunctions; _memoryDistributedCache = new MemoryDistributedCache(new MemoryCache(new MemoryCacheOptions())); _distributedCacheService = new DistributedCacheService(_memoryDistributedCache); }