Code example for Cache

Methods: put

0
    } 
 
    @Override 
    public void put(QueryParserSettings queryString, Query query) {
        if (queryString.isCacheable()) {
            cache.put(queryString, query);
        } 
    } 
 
    @Override 
    public void clear() { 
        cache.invalidateAll(); 
    } 
 
    @Override 
    public void close() throws ElasticsearchException { 
        cache.invalidateAll(); 
    } 
}