code: public void resize(int maxSize) {
  		this.maxSize = maxSize;
  		if (cache.size() > maxSize) {
  			int count = 0;
  			Iterator<Long> rowIds = cache.keySet().iterator();
  			while (rowIds.hasNext()) {
  				rowIds.next();
  				if (++count > maxSize) {
  					rowIds.remove();
  				}
  			}
  		}
  	}
docs: Resize the cache
  
  @param maxSize
  max size