com.opencms.template.cache
Class CmsElementCache

java.lang.Object
  |
  +--com.opencms.template.cache.CmsElementCache

public class CmsElementCache
extends Object

This is the starting class for OpenCms element cache. Element cache was implemented for performance issues. The idea is to create a flat hirarchie of elements that can be accessed fast and efficient for the frontend users in the online project. On publishing-time the data in the element cache area will be created or updated. All inefficiant XML-files are changed to the efficient element cache data structure. For createing the content no XML-parsing and DOM-accessing is neccessairy.

Author:
Andreas Schouten

Constructor Summary
CmsElementCache()
           
CmsElementCache(int uriCachesize, int elementCachesize, int variantCachesize)
           
 
Method Summary
 byte[] callCanonicalRoot(CmsObject cms, Hashtable parameters)
           
 void cleanupCache(Vector changedResources, Vector changedModuleRes)
          Deletes all the content of the caches that depend on the changed resources after publishProject.
 void clearCache()
          Clears the uri and the element cache compleatly.
 Vector getCacheInfo()
          Gets the Information of max size and size for the uriCache and the element cache.
 CmsElementLocator getElementLocator()
           
 CmsUriLocator getUriLocator()
           
 int getVariantCachesize()
          returns the size of the variant cache for each element.
 void printCacheInfo(int which)
          prints the cache info in the errorlog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsElementCache

public CmsElementCache()

CmsElementCache

public CmsElementCache(int uriCachesize,
                       int elementCachesize,
                       int variantCachesize)
Method Detail

getUriLocator

public CmsUriLocator getUriLocator()

getElementLocator

public CmsElementLocator getElementLocator()

getVariantCachesize

public int getVariantCachesize()
returns the size of the variant cache for each element.


cleanupCache

public void cleanupCache(Vector changedResources,
                         Vector changedModuleRes)
Deletes all the content of the caches that depend on the changed resources after publishProject.

Parameters:
changedResources - A vector (of Strings) with the resources that have changed during publishing.

clearCache

public void clearCache()
Clears the uri and the element cache compleatly. and the extern dependencies.


printCacheInfo

public void printCacheInfo(int which)
prints the cache info in the errorlog.


getCacheInfo

public Vector getCacheInfo()
Gets the Information of max size and size for the uriCache and the element cache.

Returns:
a Vector whith informations about the size of the caches.

callCanonicalRoot

public byte[] callCanonicalRoot(CmsObject cms,
                                Hashtable parameters)
                         throws CmsException
CmsException