Package graphql.kickstart.servlet.cache
Interface GraphQLResponseCacheManager
-
public interface GraphQLResponseCacheManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CachedResponseget(javax.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput)Retrieve the cache by input data.booleanisCacheable(javax.servlet.http.HttpServletRequest request, graphql.kickstart.execution.input.GraphQLInvocationInput invocationInput)Decide to cache or not this response.voidput(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 emptyOptional.- Parameters:
request- the http requestinvocationInput- 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 requestinvocationInput- 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 requestinvocationInput- input datacachedResponse- response to cache
-
-