public RedisCacheSheetTest() { _mockRepository = ServiceFactory.CreateMockSpreadsheetRepository(); var spreadSheetRepository = ServiceFactory.CreateSpreadSheetRepository(); var expiration = TimeSpan.FromSeconds(1); _mockedCachedDataRepository = ServiceFactory.CreateDistributedCachedDataRepository(expiration, _mockRepository); _cachedDataRepository = ServiceFactory.RedisCachedDataRepository(expiration, spreadSheetRepository); }
public CacheSheetTest() { _spreadsheetRepository = ServiceFactory.CreateSpreadSheetRepository(); _mockRepository = ServiceFactory.CreateMockSpreadsheetRepository(); var memoryCache = new MemoryCache(new MemoryCacheOptions()); _cachedMockedDataRepository = new CachedDataRepository(_mockRepository, memoryCache, TimeSpan.FromSeconds(1)); _cachedDataRepository = new CachedDataRepository(_spreadsheetRepository, memoryCache, TimeSpan.FromSeconds(1)); }