protected override void After(CacheAccess access, TKey key, TValue value)
 {
     if (access == CacheAccess.Set)
     {
         Evictables.Add(key);
     }
 }
Example #2
0
 protected override void Forget(TKey key)
 {
     base.Forget(key);
     if (TracksChanges())
     {
         Evictables.Remove(key);
     }
 }
Example #3
0
 protected override void Before(CacheAccess access, TKey key, TValue value)
 {
     if (access == CacheAccess.Get)
     {
         // On cache hits, the LRU/MRU policies consist in moving
         // the hit item keys to the end of the evictable collection
         // (see also After(...) below)
         Evictables.Remove(key);
     }
 }