Package graphql.kickstart.servlet.cache
Interface GraphQLResponseCacheManager
public interface GraphQLResponseCacheManager
-
Method Summary
Modifier and TypeMethodDescriptionget(jakarta.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput) Retrieve the cache by input data.booleanisCacheable(jakarta.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput) Decide to cache or not this response.voidput(jakarta.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput, CachedResponse cachedResponse) Cache this response.
-
Method Details
-
get
CachedResponse get(jakarta.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 emptyOptional.- Parameters:
request- the http requestinvocationInput- input data- Returns:
- cached response if something available in cache or null if nothing cached
-
isCacheable
boolean isCacheable(jakarta.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 requestinvocationInput- input data
-
put
void put(jakarta.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput, CachedResponse cachedResponse) Cache this response. It depends on the implementation.- Parameters:
request- the http requestinvocationInput- input datacachedResponse- response to cache
-