Exemplo n.º 1
0
 public static void Add(CoverImage image)
 {
     if (!_cache.ContainsKey(image.ID))
     {
         if (_cache.Count >= 1000)
         {
             _cache.Remove(_cache.First().Key);
         }
         _cache[image.ID] = image;
     }
 }
Exemplo n.º 2
0
 public static void Add(CoverImage image)
 {
     // Add image to cache for "large memory" profile only
     if (!TinyOPDS.Properties.Settings.Default.LowMemoryProfile)
     {
         if (!_cache.ContainsKey(image.ID))
         {
             if (_cache.Count >= 1000)
             {
                 _cache.Remove(_cache.First().Key);
             }
             _cache[image.ID] = image;
         }
     }
 }