Example #1
0
        public static TinyCache Create(string key)
        {
            var cache = new TinyCache();

            Add(key, cache);

            return(cache);
        }
Example #2
0
        public static void Add(string key, TinyCache cache)
        {
            if (caches.ContainsKey(key))
            {
                caches[key] = cache;
            }
            else
            {
                caches.Add(key, cache);
            }

            if (caches.Count == 1)
            {
                DefaultKey = key;
            }
        }
Example #3
0
 public TinyCacheDelegationHandler(TinyCache cache)
 {
     this.cache = cache;
 }