graphql-dgs-spring-graphql-example-java-webflux/src/main/java/com/netflix/graphql/dgs/example/reactive/ReactiveSpringGraphQLExampleApp.java [37:49]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Configuration
    static class PreparsedDocumentProviderConfig {

        private final Cache<String, PreparsedDocumentEntry> cache = Caffeine.newBuilder().maximumSize(250)
                .expireAfterAccess(5,TimeUnit.MINUTES).recordStats().build();


        @Bean
        public PreparsedDocumentProvider preparsedDocumentProvider() {
            return (executionInput, parseAndValidateFunction) -> {
                Function<String, PreparsedDocumentEntry> mapCompute = key -> parseAndValidateFunction.apply(executionInput);
                return CompletableFuture.completedFuture(cache.get(executionInput.getQuery(), mapCompute));
            };
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



graphql-dgs-spring-graphql-example-java/src/main/java/com/netflix/graphql/dgs/example/SpringGraphQLExampleApp.java [40:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Configuration
    static class PreparsedDocumentProviderConfig {

        private final Cache<String, PreparsedDocumentEntry> cache = Caffeine.newBuilder().maximumSize(250)
                .expireAfterAccess(5,TimeUnit.MINUTES).recordStats().build();


        @Bean
        public PreparsedDocumentProvider preparsedDocumentProvider() {
            return (executionInput, parseAndValidateFunction) -> {
                Function<String, PreparsedDocumentEntry> mapCompute = key -> parseAndValidateFunction.apply(executionInput);
                return CompletableFuture.completedFuture(cache.get(executionInput.getQuery(), mapCompute));
            };
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



