Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cocoon.cache
Class CocoonCache

    java.lang.Object
      |
      +--org.apache.cocoon.cache.CocoonCache

All Implemented Interfaces:
  Actor, Cache, Status

public class CocoonCache
extends java.lang.Object
implements Cache, Status

This is the dynamic cocoon cache implementation which is able to cache all instances of generated documents, both statically and dynamically generated.

Version:
  $Revision: 1.9 $Date: 2000/11/20 01:43:52 $
Author:
  Stefano Mazzocchi

Constructor Summary
`CocoonCache()`

Method Summary
`void` | `flush()` Flushes the cache and forces an additional cache cleanup.
`long` | `getLastModified(javax.servlet.http.HttpServletRequest request)` Get the time that this request was added to the cache.
`Page` | `getPage(javax.servlet.http.HttpServletRequest request)` This method retrieves a page from the store and checks if its changeable points have changed.
`java.lang.String` | `getStatus()` Returns information about the status of the implementing class.
`void` | `init(Director director)` Initialize the actor by indicating their director.
`void` | `setPage(Page page, javax.servlet.http.HttpServletRequest request)` If the page is cacheable, inserts it in cache and associates it with the given request.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CocoonCache

    public CocoonCache()

Method Detail

### init

    public void init(Director director)

  Description copied from interface: `Actor`
  Initialize the actor by indicating their director.
  Specified by:
    `init` in interface `Actor`

### getPage

    public Page getPage(javax.servlet.http.HttpServletRequest request)

  This method retrieves a page from the store and checks if its changeable points have changed. Only if all the changeable points haven't changed the page is returned, otherwise null is returned.
  Specified by:
    `getPage` in interface `Cache`

### getLastModified

    public long getLastModified(javax.servlet.http.HttpServletRequest request)

  Get the time that this request was added to the cache. If the request is not in the cache, returns -1.
  Specified by:
    `getLastModified` in interface `Cache`

### setPage

    public void setPage(Page page,
                        javax.servlet.http.HttpServletRequest request)

  If the page is cacheable, inserts it in cache and associates it with the given request.
  Specified by:
    `setPage` in interface `Cache`

### flush

    public void flush()

  Flushes the cache and forces an additional cache cleanup. This is normally used when the system requires additional memory.
  Specified by:
    `flush` in interface `Cache`

### getStatus

    public java.lang.String getStatus()

  Description copied from interface: `Status`
  Returns information about the status of the implementing class. Note: this is use instead of the usual `toString()` method because some of these methods are declared final in some classes in JDK 1.1.
  Specified by:
    `getStatus` in interface `Status`

Overview | Package | Class | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.