public MemoryCache() { poolingTimer = new Timer(PerformPooling, null, 1000, 10 * 1000); defaultRegion = new MemoryCacheRegion(); regions = new Dictionary<string, MemoryCacheRegion>(); }
private MemoryCacheRegion ObtainRegion(string name, bool create = false) { if (name == null) return defaultRegion; MemoryCacheRegion region = null; if (!regions.TryGetValue(name, out region) && create) regions[name] = region = new MemoryCacheRegion(); return region; }