code: public long cacheSize() {
      if (use_lru) {
        return (int) (lru_name_cache.size() + lru_id_cache.size());
      }
      return name_cache.size() + id_cache.size();
    }
docs: Returns the number of elements stored in the internal cache.