Interface GraphQLResponseCacheManager


  • public interface GraphQLResponseCacheManager
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CachedResponse get​(javax.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput)
      Retrieve the cache by input data.
      boolean isCacheable​(javax.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput)
      Decide to cache or not this response.
      void put​(javax.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput, CachedResponse cachedResponse)
      Cache this response.
    • Method Detail

      • get

        CachedResponse get​(javax.servlet.http.HttpServletRequest request,
                           graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput)
        Retrieve the cache by input data. If this query was not cached before, will return empty Optional.
        Parameters:
        request - the http request
        invocationInput - input data
        Returns:
        cached response if something available in cache or null if nothing cached
      • isCacheable

        boolean isCacheable​(javax.servlet.http.HttpServletRequest request,
                            graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput)
        Decide to cache or not this response. It depends on the implementation.
        Parameters:
        request - the http request
        invocationInput - input data
      • put

        void put​(javax.servlet.http.HttpServletRequest request,
                 graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput,
                 CachedResponse cachedResponse)
        Cache this response. It depends on the implementation.
        Parameters:
        request - the http request
        invocationInput - input data
        cachedResponse - response to cache