public BasicHttpCache( final ResourceFactory resourceFactory, final HttpCacheStorage storage, final CacheConfig config) { this( resourceFactory, storage, config, new CacheKeyGenerator()); }
/** * Create AsynchronousValidator which will make revalidation requests * using the supplied {@link CachingHttpClient} and * {@link ExecutorService}. * @param cachingClient used to execute asynchronous requests * @param executor used to manage a thread pool of revalidation workers */ AsynchronousValidator(CachingHttpClient cachingClient, ExecutorService executor) { this.cachingClient = cachingClient; this.executor = executor; this.queued = new HashSet<String>(); this.cacheKeyGenerator = new CacheKeyGenerator(); }
/** * Create AsynchronousValidator which will make revalidation requests * using the supplied {@link CachingHttpClient} and * {@link ExecutorService}. * @param cachingClient used to execute asynchronous requests * @param executor used to manage a thread pool of revalidation workers */ AsynchronousValidator(final CachingHttpClient cachingClient, final ExecutorService executor) { this.cachingClient = cachingClient; this.executor = executor; this.queued = new HashSet<String>(); this.cacheKeyGenerator = new CacheKeyGenerator(); }
/** * Create AsynchronousValidator which will make revalidation requests * using the supplied {@link SchedulingStrategy}. Closing the validator * will also close the given schedulingStrategy. * @param schedulingStrategy used to maintain a pool of worker threads and * schedules when requests are executed */ AsynchronousValidator(final SchedulingStrategy schedulingStrategy) { this.schedulingStrategy = schedulingStrategy; this.queued = new HashSet<String>(); this.cacheKeyGenerator = new CacheKeyGenerator(); this.failureCache = new DefaultFailureCache(); }
public BasicHttpCache(ResourceFactory resourceFactory, HttpCacheStorage storage, CacheConfig config) { this.resourceFactory = resourceFactory; this.uriExtractor = new CacheKeyGenerator(); this.cacheEntryUpdater = new CacheEntryUpdater(resourceFactory); this.maxObjectSizeBytes = config.getMaxObjectSize(); this.responseGenerator = new CachedHttpResponseGenerator(); this.storage = storage; this.cacheInvalidator = new CacheInvalidator(this.uriExtractor, this.storage); }
final CacheKeyGenerator uriExtractor = new CacheKeyGenerator();