org.apache.cocoon.caching
Interface Cache


public interface Cache

This is the Cocoon cache. This component is responsible for storing and retrieving cached responses. It can be used to monitor the cache or to investigate which responses are cached etc. This interface will grow!

Since:
2.1
Version:
$Id: Cache.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static String ROLE
          The Avalon Role
 
Method Summary
 void clear()
          clear cache of all cached responses
 boolean containsKey(Serializable key)
          See if a response is cached under this key.
 CachedResponse get(Serializable key)
          Get a cached response.
 void remove(Serializable key)
          Remove a cached response.
 void store(Serializable key, CachedResponse response)
          Store a cached response
 

Field Detail

ROLE

public static final String ROLE
The Avalon Role

Method Detail

store

public void store(Serializable key,
                  CachedResponse response)
           throws ProcessingException
Store a cached response

Parameters:
key - the key used by the caching algorithm to identify the request
response - the cached response
Throws:
ProcessingException

get

public CachedResponse get(Serializable key)
Get a cached response. If it is not available null is returned.

Parameters:
key - the key used by the caching algorithm to identify the request

remove

public void remove(Serializable key)
Remove a cached response. If it is not available no operation is performed.

Parameters:
key - the key used by the caching algorithm to identify the request

clear

public void clear()
clear cache of all cached responses


containsKey

public boolean containsKey(Serializable key)
See if a response is cached under this key.



Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.