public BlockStoreCache(long maxHeap, string localStorageKey) { _maxBlockCount = maxHeap/BlockInfoSize; _cache = new ConcurrentDictionary<string, BlockInfo>(); _localStorage = RoleEnvironment.GetLocalResource(localStorageKey); int capacity = (_localStorage.MaximumSizeInMegabytes/4) - 10; // Just a bit of a safety buffer _diskCache = new BlockStoreDiskCache(_localStorage.RootPath + Path.DirectorySeparatorChar + "bscache", capacity, AzureBlockStore.AzureBlockSize); }
public BlockStoreCache(long maxHeap, string localStorageKey) { _maxBlockCount = maxHeap / BlockInfoSize; _cache = new ConcurrentDictionary <string, BlockInfo>(); _localStorage = RoleEnvironment.GetLocalResource(localStorageKey); int capacity = (_localStorage.MaximumSizeInMegabytes / 4) - 10; // Just a bit of a safety buffer _diskCache = new BlockStoreDiskCache(_localStorage.RootPath + Path.DirectorySeparatorChar + "bscache", capacity, AzureBlockStore.AzureBlockSize); }