presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/RecordingHiveMetastore.java/RecordingHiveMetastore/loadValue
class RecordingHiveMetastore:    private <K, V> V loadValue(Cache<K, V> cache, K key, Supplier<V> valueSupplier)
    {
        if (replay) {
            return Optional.ofNullable(cache.getIfPresent(key))
                    .orElseThrow(() -> new PrestoException(NOT_FOUND, "Missing entry found for key: " + key));
        }

        V value = valueSupplier.get();
        cache.put(key, value);
        return value;
    }