public DefaultMemoryCache(ISettingsProvider settingsProvider) { MemoryClassPluginSettings settings = settingsProvider.GetSettings <MemoryClassPluginSettings>("MemoryCachePluginConfiguration"); // create the caches if (_cache == null) { _cache = new CacheManager(Constants.CacheNameDefault, new TimeSpan(0, settings.DefaultCacheDuration, 0)); } if (_cacheShort == null) { _cacheShort = new CacheManager(Constants.CacheNameShort, new TimeSpan(0, settings.ShortCacheDuration, 0)); } if (_extendingCache == null) { _extendingCache = new CacheManager(Constants.CacheNameExtending, new TimeSpan(0, settings.DefaultCacheDuration, 0), true); } if (_permanentCache == null) { _permanentCache = new CacheManager(Constants.CacheNamePermanent, new TimeSpan(5000, 0, 0, 0), true); } }
public MemoryCache(ISettingsProvider settingsProvider) { ThreadManager.Initialise(); MemoryClassPluginSettings settings = settingsProvider.GetSettings <MemoryClassPluginSettings>("MemoryCachePluginConfiguration"); // create the caches if (_cache == null) { _cache = new CacheManager("Website Internal Cache", new TimeSpan(0, settings.DefaultCacheDuration, 0)); } if (_cacheShort == null) { _cacheShort = new CacheManager("Website Internal Short Cache", new TimeSpan(0, settings.ShortCacheDuration, 0)); } }