public ColumnStatistics getTableColStatsFromCache(String catName, String dbName, String tblName,
      List<String> colNames, String validWriteIds, boolean areTxnStatsSupported) throws MetaException {
    try {
      cacheLock.readLock().lock();
      TableWrapper tblWrapper = tableCache.getIfPresent(CacheUtils.buildTableKey(catName, dbName, tblName));
      if (tblWrapper == null) {
        LOG.info("Table " + tblName + " is missing from cache.");
        return null;
      }
      ColumnStatisticsDesc csd = new ColumnStatisticsDesc(true, dbName, tblName);
      return tblWrapper.getCachedTableColStats(csd, colNames, validWriteIds, areTxnStatsSupported);
    } finally {
      cacheLock.readLock().unlock();
    }
  }
Replaces the old db object with the new one. This will add the new database to cache if it does
not exist.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java