public class MemoryCache extends java.lang.Object implements CacheProvider
Modifier and Type | Field and Description |
---|---|
static long |
NO_TIME_LIMIT |
Constructor and Description |
---|
MemoryCache() |
MemoryCache(long maxLifetime) |
MemoryCache(long maxLifetime,
boolean isClearExpired)
Deprecated.
isClearExpired parameter is ignored (it will always be true),
so use MemoryCache(long) constructor instead. |
Modifier and Type | Method and Description |
---|---|
protected void |
clearExpired() |
EventResult |
loadFromCache(Event event) |
void |
saveToCache(Event event,
EventResult result) |
protected java.lang.String |
toCacheKey(Event event) |
public static final long NO_TIME_LIMIT
public MemoryCache()
public MemoryCache(long maxLifetime)
@Deprecated public MemoryCache(long maxLifetime, boolean isClearExpired)
isClearExpired
parameter is ignored (it will always be true),
so use MemoryCache(long)
constructor instead.public EventResult loadFromCache(Event event)
loadFromCache
in interface CacheProvider
public void saveToCache(Event event, EventResult result)
saveToCache
in interface CacheProvider
protected void clearExpired()
protected java.lang.String toCacheKey(Event event)