@Override public void run() {
      if (!shouldRunPrewarm) {
        if (canUseEvents) {
          try {
            triggerUpdateUsingEvent(rawStore);
          } catch (Exception e) {
            LOG.error("failed to update cache using events ", e);
          }
        } else {
          // TODO: prewarm and update can probably be merged.
          try {
            update();
          } catch (Exception e) {
            LOG.error("periodical refresh fail ", e);
          }
        }
      } else {
        try {
          triggerPreWarm(rawStore);
          shouldRunPrewarm = false;
        } catch (Exception e) {
          LOG.error("Prewarm failure", e);
          return;
        }
      }
    }
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