org.apache.cocoon.caching
Interface Cache

All Superinterfaces:
Component
All Known Implementing Classes:
CacheImpl, EventAwareCacheImpl

public interface Cache
extends Component

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:
CVS $Id: Cache.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler

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

static final String ROLE
The Avalon Role

Method Detail

store

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

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

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

void clear()
clear cache of all cached responses


containsKey

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



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.