public MemoryCacheManager(IConfiguration config, IPenguinPersistenceDriver driver) { this.config = config; this.driver = driver; int cacheCount; if (int.TryParse(config["memory_cache_count"], out cacheCount)) { this.cache = new GlobalCache(cacheCount); } else { throw new PersistenceException("Invalid memory_cache_count configuration, must be a number."); } }
public MemoryCacheDriver(IConfiguration config, IPenguinPersistenceDriver driver, GlobalCache globalCache) { this.config = config; this.driver = driver; this.globalCache = globalCache; }
public MemoryCacheManager(IPenguinPersistenceDriver driver) { this.driver = driver; this.cache = new GlobalCache(defaultCacheCount); }