org.xwiki.rendering.internal.macro.cache
Class CacheKey

java.lang.Object
  extended by org.xwiki.rendering.internal.macro.cache.CacheKey

public class CacheKey
extends Object

Key to recognize a given Cache. We need to have several caches since currently there's one cache per timeToLive/maxEntry combination. This is because currently we cannot set these configuration values at the cache entry level but only for the whole cache.

Since:
3.3M1

Constructor Summary
CacheKey(int timeToLive, int maxEntries)
           
 
Method Summary
 boolean equals(Object object)
           
 int getMaxEntries()
           
 int getTimeToLive()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheKey

public CacheKey(int timeToLive,
                int maxEntries)
Parameters:
timeToLive - see getTimeToLive()
maxEntries - see getMaxEntries()
Method Detail

getTimeToLive

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

getMaxEntries

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

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object