示例#1
0
 /// <summary>
 /// Instantiates the <see cref="BufferedDiskCache"/>.
 /// </summary>
 public BufferedDiskCache(
     IFileCache fileCache,
     IPooledByteBufferFactory pooledByteBufferFactory,
     PooledByteStreams pooledByteStreams,
     IExecutorService readExecutor,
     IExecutorService writeExecutor,
     IImageCacheStatsTracker imageCacheStatsTracker)
 {
     _fileCache = fileCache;
     _pooledByteBufferFactory = pooledByteBufferFactory;
     _pooledByteStreams       = pooledByteStreams;
     _readExecutor            = readExecutor;
     _writeExecutor           = writeExecutor;
     _imageCacheStatsTracker  = imageCacheStatsTracker;
     _stagingArea             = StagingArea.Instance;
 }
 /// <summary>
 /// Instantiates the <see cref="BufferedDiskCache"/>.
 /// </summary>
 public BufferedDiskCache(
     IFileCache fileCache,
     IPooledByteBufferFactory pooledByteBufferFactory,
     PooledByteStreams pooledByteStreams,
     IExecutorService readExecutor,
     IExecutorService writeExecutor,
     IImageCacheStatsTracker imageCacheStatsTracker)
 {
     _fileCache = fileCache;
     _pooledByteBufferFactory = pooledByteBufferFactory;
     _pooledByteStreams       = pooledByteStreams;
     _readExecutor            = readExecutor;
     _writeExecutor           = writeExecutor;
     _imageCacheStatsTracker  = imageCacheStatsTracker;
     _stagingArea             = StagingArea.Instance;
     _writeToDiskCacheTasks   = new ConcurrentDictionary <ICacheKey, Task>();
 }