public GraphqlInAppCacheService( CacheConfiguration cacheConfiguration, ICachePolicy cachePolicy, IScopedServiceProviderResolver serviceProviderResolver) { _cacheConfiguration = cacheConfiguration; _cachePolicy = cachePolicy; switch (cacheConfiguration.ResponseCache) { case ResponseCacheType.Memory: _memoryCache = serviceProviderResolver.GetProvider().GetService <IMemoryCache>(); break; case ResponseCacheType.Distributed: _distributedCache = serviceProviderResolver.GetProvider().GetService <IDistributedCache>(); break; } }
public DefaultCachePolicy(CacheConfiguration cacheConfiguration) { _cacheConfiguration = cacheConfiguration; }