public virtual void Close()
 {
     lock (this)
     {
         cache.Clear();
         cache = null;
     }
 }
 public virtual void Dispose()
 {
     lock (this)
     {
         if (cache != null)
         {
             cache.Clear();
             cache = null;
         }
     }
 }
 /// <summary>
 /// Creates this with the specified method.
 /// </summary>
 public LruTaxonomyWriterCache(int cacheSize, LRUType lruType)
 {
     // TODO (Facet): choose between NameHashIntCacheLRU and NameIntCacheLRU.
     // For guaranteed correctness - not relying on no-collisions in the hash
     // function, NameIntCacheLRU should be used:
     // On the other hand, NameHashIntCacheLRU takes less RAM but if there
     // are collisions (which we never found) two different paths would be
     // mapped to the same ordinal...
     if (lruType == LRUType.LRU_HASHED)
     {
         this.cache = new NameHashIntCacheLRU(cacheSize);
     }
     else
     {
         this.cache = new NameIntCacheLRU(cacheSize);
     }
 }
 /// <summary>
 /// Creates this with the specified method.
 /// </summary>
 public LruTaxonomyWriterCache(int cacheSize, LRUType lruType)
 {
     // TODO (Facet): choose between NameHashIntCacheLRU and NameIntCacheLRU.
     // For guaranteed correctness - not relying on no-collisions in the hash
     // function, NameIntCacheLRU should be used:
     // On the other hand, NameHashIntCacheLRU takes less RAM but if there
     // are collisions (which we never found) two different paths would be
     // mapped to the same ordinal...
     if (lruType == LRUType.LRU_HASHED)
     {
         this.cache = new NameHashIntCacheLRU(cacheSize);
     }
     else
     {
         this.cache = new NameIntCacheLRU(cacheSize);
     }
 }
 public virtual void Dispose()
 {
     lock (this)
     {
         if (cache != null)
         {
             cache.Clear();
             cache = null;
         }
     }
 }
 public virtual void Close()
 {
     lock (this)
     {
         cache.Clear();
         cache = null;
     }
 }