private void updateTables(RawStore rawStore, String catName, String dbName) {
      LOG.debug("CachedStore: updating cached table objects for catalog: {}, database: {}", catName, dbName);
      boolean success = false;
      // Try MAX_RETRIES times, then move to next method
      int maxTries = MAX_RETRIES;
      while (!success && (maxTries-- > 0)) {
        List<Table> tables = new ArrayList<>();
        try {
          List<String> tblNames = rawStore.getAllTables(catName, dbName);
          for (String tblName : tblNames) {
            if (!shouldCacheTable(catName, dbName, tblName)) {
              continue;
            }
            Table table = rawStore
                .getTable(StringUtils.normalizeIdentifier(catName), StringUtils.normalizeIdentifier(dbName),
                    StringUtils.normalizeIdentifier(tblName));
            tables.add(table);
          }
          success = sharedCache.refreshTablesInCache(catName, dbName, tables);
          LOG.debug("CachedStore: updated cached table objects for catalog: {}, database: {}", catName, dbName);
        } catch (MetaException e) {
          LOG.debug("Unable to refresh cached tables for database: " + dbName, e);
        }
      }
    }
This starts a background thread, which initially populates the SharedCache and later
periodically gets updates from the metastore db

@param conf
@param runOnlyOnce
@param shouldRunPrewarm
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java