public class CacheControl extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
activeCache
Whether this CacheControl actually should cache hits at all.
|
static com.yahoo.processing.request.CompoundName |
nocachewrite |
private PacketCache |
packetCache
Direct unsychronized cache access
|
Constructor and Description |
---|
CacheControl(int sizeMegaBytes,
double cacheTimeOutSeconds) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
cache(CacheKey key,
Query query,
DocsumPacketKey[] packetKeys,
Packet[] packets,
Optional<Integer> distributionKey) |
int |
capacity()
Returns the capacity of the packet cache in megabytes
|
void |
clear()
Test method.
|
PacketWrapper |
lookup(CacheKey key,
Query query) |
(package private) void |
updateCacheEntry(CacheKey key,
Query query,
DocsumPacketKey[] packetKeys,
Packet[] packets) |
(package private) void |
updateCacheEntry(CacheKey key,
Query query,
QueryResultPacket resultPacket) |
boolean |
useCache(Query query) |
public static final com.yahoo.processing.request.CompoundName nocachewrite
private final boolean activeCache
private final PacketCache packetCache
public final int capacity()
public final boolean useCache(Query query)
public final PacketWrapper lookup(CacheKey key, Query query)
void updateCacheEntry(CacheKey key, Query query, QueryResultPacket resultPacket)
void updateCacheEntry(CacheKey key, Query query, DocsumPacketKey[] packetKeys, Packet[] packets)
void cache(CacheKey key, Query query, DocsumPacketKey[] packetKeys, Packet[] packets, Optional<Integer> distributionKey)
public void clear()
Copyright © 2018. All rights reserved.