Ejemplo n.º 1
0
 public MemCachePlugin(long maxBytes, TimeSpan usageWindow)
 {
     //Cleanup at most once per minute, unless hitting the limits.
     cache = new ConstrainedCache <string, MemCacheResult>(StringComparer.OrdinalIgnoreCase, delegate(string key, MemCacheResult file) {
         return(key.Length * 4 + file.BytesOccupied);
     }, maxBytes, usageWindow, new TimeSpan(0, 1, 0));
 }
Ejemplo n.º 2
0
 public MemCachePlugin(long maxBytes, TimeSpan usageWindow)
 {
     //Cleanup at most once per minute, unless hitting the limits.
     cache = new ConstrainedCache<string, MemCacheResult>(StringComparer.OrdinalIgnoreCase, delegate(string key, MemCacheResult file) {
         return key.Length * 4 + file.BytesOccupied;
     }, maxBytes, usageWindow, new TimeSpan(0, 1, 0));
 }