private Map<Object, Object> getQueryCache() {
    String queryId = getQueryId();
    if (queryId != null) {
      SessionState ss = SessionState.get();
      if (ss != null) {
        return ss.getQueryCache(queryId);
      }
    }
    return null;
  }
Wrapper to create a cache around a Map.
ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java