@Override
  public List<SQLForeignKey> getForeignKeys(ForeignKeysRequest request) throws MetaException {
    // Get correct ForeignDBName and TableName
    if (StringUtils.isEmpty(request.getParent_db_name()) || StringUtils.isEmpty(request.getParent_tbl_name())
        || StringUtils.isEmpty(request.getForeign_db_name()) || StringUtils.isEmpty(request.getForeign_tbl_name())) {
      return rawStore.getForeignKeys(request);
    }

    String catName = StringUtils.normalizeIdentifier(request.getCatName());
    String foreignDbName = StringUtils.normalizeIdentifier(request.getForeign_db_name());
    String foreignTblName = StringUtils.normalizeIdentifier(request.getForeign_tbl_name());
    String parentDbName =
        StringUtils.isEmpty(request.getParent_db_name()) ? "" : normalizeIdentifier(request.getParent_db_name());
    String parentTblName = StringUtils.isEmpty(request.getParent_tbl_name()) ? "" : StringUtils
        .normalizeIdentifier(request.getParent_tbl_name());

    if (shouldGetConstraintFromRawStore(catName, foreignDbName, foreignTblName)) {
      return rawStore.getForeignKeys(request);
    }
    return sharedCache.listCachedForeignKeys(catName, foreignDbName, foreignTblName, parentDbName, parentTblName);
  }
getPartitionSpecsByFilterAndProjection interface is currently non-cacheable.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java