void memoize(@NotNull MyKey key, @Nullable Object result, @NotNull Set<MyKey> preventionsInside) {
      intermediateCache.put(key, new MemoizedValue(result, preventionsInside.toArray(new MyKey[0])));
    }
void memoize(@NotNull MyKey key, @Nullable Object result, @NotNull Set<MyKey> preventionsInside)