net.sf.ooweb.http
Class SimpleCache
java.lang.Object
net.sf.ooweb.http.SimpleCache
- All Implemented Interfaces:
- Cache
public class SimpleCache
- extends java.lang.Object
- implements Cache
SimpleCache is just a memory cache with no distribution or delta
capability. OK for small, standalone ooweb apps, but not much use
for anything else. It is suggested you create an implementation
of the Cache interface that uses ehcache, swarmcache or something
else under the hood.
- Since:
- 0.7.1
- Author:
- Darren Davison
Method Summary |
ResponseState |
get(ObjectAndMethod oam)
return a cached ResponseState for the keyed ObjectAndMethod, or null
if no such entry exists (or if it's just been expired) |
void |
put(ObjectAndMethod oam,
ResponseState respState,
java.lang.Long timeout)
add a new object to cache specifying the maximum timeout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleCache
public SimpleCache()
get
public ResponseState get(ObjectAndMethod oam)
- Description copied from interface:
Cache
- return a cached ResponseState for the keyed ObjectAndMethod, or null
if no such entry exists (or if it's just been expired)
- Specified by:
get
in interface Cache
- Returns:
- a cached ResponseState object from a previous call to this
ObjectAndMethod
- See Also:
net.sf.ooweb.http.Cache#get(net.sf.ooweb.http.ObjectAndMethod)
put
public void put(ObjectAndMethod oam,
ResponseState respState,
java.lang.Long timeout)
- Description copied from interface:
Cache
- add a new object to cache specifying the maximum timeout
- Specified by:
put
in interface Cache
- See Also:
net.sf.ooweb.http.Cache#put(net.sf.ooweb.http.ObjectAndMethod, net.sf.ooweb.http.ResponseState, java.lang.Long)
Copyright (C) 2005-2007 OOWeb Authors.