com.opencms.launcher
Interface I_CmsTemplateCache


public interface I_CmsTemplateCache

Common interface for the OpenCms template cache. Classes and for a customized template cache have to be implemtented.

Version:
$Revision: 1.6 $ $Date: 2002/12/06 23:16:54 $
Author:
Alexander Lucas

Method Summary
 void clearCache()
          Deletes all documents from the template cache.
 void clearCache(Object key)
          Deletes the document with the given key from the template cache.
 byte[] get(Object key)
          Gets a previously cached template with the given key.
 boolean has(Object key)
          Checks if there exists a cached template content for a given key.
 void put(Object key, byte[] content)
          Stores a template content in the cache using the given key.
 

Method Detail

clearCache

public void clearCache()
Deletes all documents from the template cache.


clearCache

public void clearCache(Object key)
Deletes the document with the given key from the template cache.

Parameters:
key - Key of the template that should be deleted.

get

public byte[] get(Object key)
Gets a previously cached template with the given key.

Parameters:
key - Key of the requested template.
Returns:
byte array with the cached template content or null if no cached value was found.

has

public boolean has(Object key)
Checks if there exists a cached template content for a given key.

Parameters:
key - Key that should be checked.
Returns:
true if a cached content was found, false otherwise.

put

public void put(Object key,
                byte[] content)
Stores a template content in the cache using the given key.

Parameters:
key - Key that should be used to store the template
content - Template content to store.