@Override public List<Partition> alterPartitions(String catName, String dbName, String tblName,
      List<List<String>> partValsList, List<Partition> newParts, long writeId, String validWriteIds)
      throws InvalidObjectException, MetaException {
    newParts = rawStore.alterPartitions(catName, dbName, tblName, partValsList, newParts, writeId, validWriteIds);
    // in case of event based cache update, cache will be updated during commit.
    if (canUseEvents) {
      return newParts;
    }
    catName = normalizeIdentifier(catName);
    dbName = normalizeIdentifier(dbName);
    tblName = normalizeIdentifier(tblName);
    if (!shouldCacheTable(catName, dbName, tblName)) {
      return newParts;
    }
    sharedCache.alterPartitionsInCache(catName, dbName, tblName, partValsList, newParts);
    return newParts;
  }
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