private MosaicStore CacheTryGetValueSetMosaicStore() { MosaicStore cacheEntry; if (!_cache.TryGetValue(MOSAIC_STORE_KEY, out cacheEntry)) { cacheEntry = new MosaicStore(); var cacheEntryOptions = new MemoryCacheEntryOptions() .SetSlidingExpiration(TimeSpan.FromMinutes(120)); _cache.Set(MOSAIC_STORE_KEY, cacheEntry, cacheEntryOptions); } return(cacheEntry); }
public SwipeRelayerTest() { _mosaicStore = new MosaicStore(); _swipeRelayer = (new SwipeRelayer()).SetMosaicStore(_mosaicStore); }