public void Put(IDynamicCacheItem item)
 {
     item.CacheIdentifier = this.cacheIdentifier;
     this.CacheDictionary.Add(item.KeyAndCacheIdentifier, item);
 }
Esempio n. 2
0
 public static void Put(string cacheIdentifier, IDynamicCacheItem itemToCache)
 {
     ICache cache = Enumerable.FirstOrDefault<ICache>(CacheStores, (Func<ICache, bool>) (s => (s.Identification == cacheIdentifier)));
     if (cache != null)
     {
         cache.Put(itemToCache);
     }
     else if (throwExceptionsOnInvalidStoreAccess)
     {
         throw new KeyNotFoundException("Cache store with identifier " + cacheIdentifier + " not found.");
     }
 }