コード例 #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 SetZippedMinCacheBytes(string path, byte[] content)
 {
     ZippedCache.AddOrUpdate(path, content, (s, b) => content);
 }