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