Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions documentation/execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ Cache<String, PreparsedDocumentEntry> cache = Caffeine.newBuilder().maximumSize(

PreparsedDocumentProvider preparsedCache = new PreparsedDocumentProvider() {
@Override
public PreparsedDocumentEntry getDocument(ExecutionInput executionInput, Function<ExecutionInput, PreparsedDocumentEntry> computeFunction) {
public CompletableFuture<PreparsedDocumentEntry> getDocumentAsync(ExecutionInput executionInput, Function<ExecutionInput, PreparsedDocumentEntry> computeFunction) {
Function<String, PreparsedDocumentEntry> mapCompute = key -> computeFunction.apply(executionInput);
return cache.get(executionInput.getQuery(), mapCompute);
return CompletableFuture.completedFuture(cache.get(executionInput.getQuery(), mapCompute));
}
};

Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-v22/execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ Cache<String, PreparsedDocumentEntry> cache = Caffeine.newBuilder().maximumSize(

PreparsedDocumentProvider preparsedCache = new PreparsedDocumentProvider() {
@Override
public PreparsedDocumentEntry getDocument(ExecutionInput executionInput, Function<ExecutionInput, PreparsedDocumentEntry> computeFunction) {
public CompletableFuture<PreparsedDocumentEntry> getDocumentAsync(ExecutionInput executionInput, Function<ExecutionInput, PreparsedDocumentEntry> computeFunction) {
Function<String, PreparsedDocumentEntry> mapCompute = key -> computeFunction.apply(executionInput);
return cache.get(executionInput.getQuery(), mapCompute);
return CompletableFuture.completedFuture(cache.get(executionInput.getQuery(), mapCompute));
}
};

Expand Down