public void populateCache(List<Pair<String, String>> tables, HiveConf conf,
      HiveTxnManager txnMgr) {
    // if there is no transaction, then we don't need to fetch the validWriteIds.
    if (txnMgr == null || !txnMgr.isTxnOpen()) {
      return;
    }

    List<String> fullTableNamesList = new ArrayList<>(getAllUniqueViewsAndTables(tables));
    LOG.debug("Populating query cache");
    for (String s : fullTableNamesList) {
      LOG.debug("Populating table " + s);
    }
    String validTxnList = conf.get(ValidTxnList.VALID_TXNS_KEY);
    try {
      txnMgr.getValidWriteIds(fullTableNamesList, validTxnList);
    } catch (Exception e) {
      LOG.info("Population of valid write id list cache failed, will be done later in query.");
    }
  }
Populates the cache for the given table pairs. The tables passed in are a Pair
containing the dbname (null if not given) and the table name.
ql/src/java/org/apache/hadoop/hive/ql/parse/CacheTableHelper.java