public CachingConfigurationSourceDecorator(IConfigurationSource innerSource, ICacheKeyCreator cacheKeyCreator, ObjectCache objectCache, Func <CacheItemPolicy> cacheItemPolicyFactoryFactory) { _innerSource = innerSource; _cacheKeyCreator = cacheKeyCreator; _objectCache = objectCache; _cacheItemPolicyFactory = cacheItemPolicyFactoryFactory; }
public MemcachedCacheImplementation(ICacheKeyCreator keyCreator) { Ensure.That(keyCreator.IsNotNull(), "keyCreator not supplied"); _keyCreator = keyCreator; (this as ICacheImplementation).IsEnabled = true; //hard-coded for time being, could be read in from config file }
public CPUsInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, CPUsSelector cpusSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _cpusSelector = cpusSelector; }
public ComputerDrivesInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, ComputerDrivesSelector computerDrivesSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _computerDrivesSelector = computerDrivesSelector; }
public VideoCardsInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, VideoCardsSelector videoCardsSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _videoCardsSelector = videoCardsSelector; }
public HeadphonesInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, HeadphonesSelector headphonesSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _headphonesSelector = headphonesSelector; }
static CacheUtil() { commConfig = new CacheCommonConfig { ProxyType = CacheProxyType.WebCache, Duration = 20, Tempaltes = Enumerable.Empty <CacheTemplate>() }; cacheKeyCreator = new DefaultCacheKeyCreator(); }
public FlashDrivesInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, FlashDrivesSelector flashDrivesSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _flashDrivesSelector = flashDrivesSelector; }
public LaptopsInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, LaptopsSelector laptopsSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _laptopsSelector = laptopsSelector; }
public GoodsInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, GoodsSelector goodsSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _goodsSelector = goodsSelector; }
public GoodsController(IGoodsInformationCreator goodsInformationCreator, ApplicationDbContext context, IMapper mapper, IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator) { _goodsInformationCreator = goodsInformationCreator; _context = context; _mapper = mapper; _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; }
public void Setup() { ICacheImplementation a = new AspDotNetDataCacheImplementation(Key.KeyCreator); a.RemoveAll(); _stubKeyCreator = MockRepository.GenerateStub<ICacheKeyCreator>(); _c = new AspDotNetDataCacheImplementation(_stubKeyCreator); _oneHour = new TimeSpan(1,0,0); }
public static IConfigurationSourceConfigurator WithCache(this IConfigurationSourceConfigurator configurationSourceConfigurator, ICacheKeyCreator cacheKeyCreator, ObjectCache objectCache, Func <CacheItemPolicy> cacheItemPolicyFactory) { return(configurationSourceConfigurator.WrapSource(x => new CachingConfigurationSourceDecorator(x, cacheKeyCreator, objectCache, cacheItemPolicyFactory))); }
public static void UseCacheKeyCreator(ICacheKeyCreator creator) { cacheKeyCreator = creator; }
public void Setup() { ICacheImplementation a = new AspDotNetDataCacheImplementation(Key.KeyCreator); a.RemoveAll(); _stubKeyCreator = MockRepository.GenerateStub<ICacheKeyCreator>(); _c = new AspDotNetDataCacheImplementation(_stubKeyCreator); _tomorrow = 1.Day().Hence(); _oneHour = 1.Hour(); _testString = "test"; }