|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.caching.impl.CacheImpl
org.apache.cocoon.caching.SimpleCache
This cache implementation is an extension to the default cache implementation. If a response is not found in the cache or is invalid, it also checks the file system for a cached response. This allows to update the cache information by running batch processes.
| Field Summary | |
protected String |
baseDirectory
The base directory |
protected Map |
locks
|
| Fields inherited from class org.apache.cocoon.caching.impl.CacheImpl |
manager, store |
| Fields inherited from interface org.apache.cocoon.caching.Cache |
ROLE |
| Constructor Summary | |
SimpleCache()
|
|
| Method Summary | |
void |
clear()
clear cache of all cached responses |
boolean |
containsKey(Serializable key)
See if a response is cached under this key |
protected byte[] |
get(File file)
Get the content from a file |
CachedResponse |
get(Serializable key)
Get a cached response. |
protected File |
getFile(Serializable key)
Get the filename |
void |
parameterize(Parameters parameters)
|
void |
remove(Serializable key)
Remove a cached response. |
protected void |
store(File file,
byte[] content)
store the content in a file |
void |
store(Serializable key,
CachedResponse response)
Store a cached response |
| Methods inherited from class org.apache.cocoon.caching.impl.CacheImpl |
dispose, service |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String baseDirectory
protected Map locks
| Constructor Detail |
public SimpleCache()
| Method Detail |
public void parameterize(Parameters parameters)
throws ParameterException
parameterize in interface Parameterizableparameterize in class CacheImplParameterExceptionprotected File getFile(Serializable key)
public void clear()
CacheImpl
clear in interface Cacheclear in class CacheImplpublic boolean containsKey(Serializable key)
CacheImpl
containsKey in interface CachecontainsKey in class CacheImplpublic CachedResponse get(Serializable key)
CacheImplnull is returned.
get in interface Cacheget in class CacheImplkey - the key used by the caching algorithm to identify the
requestpublic void remove(Serializable key)
CacheImpl
remove in interface Cacheremove in class CacheImplkey - the key used by the caching algorithm to identify the
request
public void store(Serializable key,
CachedResponse response)
throws ProcessingException
CacheImpl
store in interface Cachestore in class CacheImplkey - the key used by the caching algorithm to identify the
requestresponse - the cached response
ProcessingException
protected void store(File file,
byte[] content)
protected byte[] get(File file)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||