public class EtagCacheRequestHandler extends BaseDataRequestHandler
If a query is cached, the etag of the query is retrieved from the cache and is injected into query request header
Etag-based cache mechanism relies entirely on Druid's etags to determine a cache hit or miss.
| Modifier and Type | Field and Description |
|---|---|
protected TupleDataCache<String,String,String> |
dataCache |
protected DataRequestHandler |
next |
mapper, writer| Constructor and Description |
|---|
EtagCacheRequestHandler(DataRequestHandler next,
TupleDataCache<String,String,String> dataCache,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Build a Cache request handler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleRequest(RequestContext context,
DataApiRequest request,
DruidAggregationQuery<?> druidQuery,
ResponseProcessor response)
Handle the response, passing the request down the chain as necessary.
|
protected final DataRequestHandler next
protected final TupleDataCache<String,String,String> dataCache
public EtagCacheRequestHandler(@NotNull
DataRequestHandler next,
@NotNull
TupleDataCache<String,String,String> dataCache,
@NotNull
com.fasterxml.jackson.databind.ObjectMapper mapper)
next - The next handler in the chaindataCache - The cache instancemapper - The mapper for all JSON processingpublic boolean handleRequest(RequestContext context, DataApiRequest request, DruidAggregationQuery<?> druidQuery, ResponseProcessor response)
DataRequestHandlercontext - The context for the Requestrequest - The Api Request ObjectdruidQuery - The druid queryresponse - The Async responseCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.