org.xwiki.rendering.macro.cache
Class CacheMacroParameters

java.lang.Object
  extended by org.xwiki.rendering.macro.cache.CacheMacroParameters

public class CacheMacroParameters
extends Object

Parameters for the Cache macro.

Since:
3.0M1
Version:
$Id$

Constructor Summary
CacheMacroParameters()
           
 
Method Summary
 String getId()
           
 int getMaxEntries()
           
 int getTimeToLive()
           
 void setId(String id)
           
 void setMaxEntries(int maxEntries)
           
 void setTimeToLive(int timeToLive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheMacroParameters

public CacheMacroParameters()
Method Detail

getId

public String getId()
Returns:
the optional unique id to use to cache the content. If not defined then use the content itself as the id but this doesn't guarantee unicity since the same content could be located on several pages with different results. Also note that the id is considered containing wiki syntax; this is done so that the user can use script macros to generate the id

setId

public void setId(String id)
Parameters:
id - refer to getId()

getTimeToLive

public int getTimeToLive()
Returns:
the number of seconds to cache the content

setTimeToLive

public void setTimeToLive(int timeToLive)
Parameters:
timeToLive - refer to getTimeToLive()

getMaxEntries

public int getMaxEntries()
Returns:
the maximum number of entries in the cache (Least Recently Used entries are ejected)

setMaxEntries

public void setMaxEntries(int maxEntries)
Parameters:
maxEntries - refer to getMaxEntries()


Copyright © 2004-2012 XWiki. All Rights Reserved.