Пример #1
0
 protected bool ReadCache(IRequest request, string path, out byte[] content)
 {
     if (ShouldZip(request))
     {
         if (!ZippedMinCache.TryGetValue(path, out content))
         {
             return(ZippedCache.TryGetValue(path, out content));
         }
     }
     else
     {
         if (!MinCache.TryGetValue(path, out content))
         {
             return(Cache.TryGetValue(path, out content));
         }
     }
     return(true);
 }
Пример #2
0
 private void SetMinCacheBytes(string path, byte[] content)
 {
     MinCache.AddOrUpdate(path, content, (s, b) => content);
 }