package org.fulworx.core.util.cache;
import org.fulworx.core.util.cache.entry.TimeoutEntry;
import org.fulworx.core.rest.restlet.CacheKey;
/**
* @author teastlack
* @date Oct 22, 2007
*/
public class TimeoutCache extends SimpleCache
{
public TimeoutCache(CacheMap cacheObjects)
{
super(cacheObjects);
}
@Override
public void addEntry(CacheKey key, Object value)
{
addEntry(key, value, -1l);
}
public void addEntry(CacheKey key, Object value, long timeoutMilliseconds)
{
this.getCacheObjects().put(key, new TimeoutEntry(key, value, timeoutMilliseconds));
}
}
|