code: @SuppressWarnings("rawtypes")
  	private final int removeEldestElementsFromCache(final IntLinkedHashMap<Node> hash, final int maxSize) {
  		final int evict = hash.size() - maxSize;
  		if (evict <= 0) {
  			return 0;
  		}
  
  		for (int count = 0; count < evict; count++) {
  			hash.removeEldest();
  		}
  		return evict;
  	}
docs: Evict from Read Cache excess nodes
  
  @param hash cache to purge
  @param maxSize max elements to hold in cache
  @return int number of elements evicted