Class PathCacheService
- java.lang.Object
-
- fr.paris.lutece.portal.service.cache.AbstractCacheableService
-
- fr.paris.lutece.portal.service.cache.PathCacheService
-
- All Implemented Interfaces:
CacheableService,IPathCacheService,PageEventListener,LuteceService,java.lang.Cloneable,java.util.EventListener,net.sf.ehcache.event.CacheEventListener
public class PathCacheService extends AbstractCacheableService implements IPathCacheService, PageEventListener
XPage path cache service
-
-
Field Summary
-
Fields inherited from interface fr.paris.lutece.portal.service.cache.IPathCacheService
BEAN_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFromCache(java.lang.String strKey)Gets an object from the cachejava.lang.StringgetKey(java.lang.String strXPageName, int nMode, java.lang.String strTitlesUrls, javax.servlet.http.HttpServletRequest request)Constructs a cache keyjava.lang.StringgetKey(java.lang.String strXPageName, int nMode, javax.servlet.http.HttpServletRequest request)Constructs a cache keyjava.lang.StringgetName()Returns the Service namevoidprocessPageEvent(PageEvent event)Process a page eventvoidputInCache(java.lang.String strKey, java.lang.String path)Put a path in cache-
Methods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService
clone, dispose, enableCache, getCache, getCacheSize, getInfos, getKeys, getMaxElements, getMemorySize, getStatistics, getTimeToLive, initCache, initCache, isCacheEnable, notifyElementEvicted, notifyElementExpired, notifyElementPut, notifyElementRemoved, notifyElementUpdated, notifyRemoveAll, putInCache, removeKey, resetCache
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:LuteceServiceReturns the Service name- Specified by:
getNamein interfaceLuteceService- Returns:
- The name as a String
-
getKey
public java.lang.String getKey(java.lang.String strXPageName, int nMode, javax.servlet.http.HttpServletRequest request)Description copied from interface:IPathCacheServiceConstructs a cache key- Specified by:
getKeyin interfaceIPathCacheService- Parameters:
strXPageName- the XPage namenMode- the moderequest- the request- Returns:
- the cache key, or
nullif for instance the cache is not enabled
-
getKey
public java.lang.String getKey(java.lang.String strXPageName, int nMode, java.lang.String strTitlesUrls, javax.servlet.http.HttpServletRequest request)Description copied from interface:IPathCacheServiceConstructs a cache key- Specified by:
getKeyin interfaceIPathCacheService- Parameters:
strXPageName- the XPage namenMode- the modestrTitlesUrls- list of links (url and titles)request- the request the request- Returns:
- the cache key, or
nullif for instance the cache is not enabled
-
getFromCache
public java.lang.String getFromCache(java.lang.String strKey)
Description copied from class:AbstractCacheableServiceGets an object from the cache- Specified by:
getFromCachein interfaceIPathCacheService- Overrides:
getFromCachein classAbstractCacheableService- Parameters:
strKey- The key of the object to retrieve from the cache- Returns:
- The object from the cache
-
putInCache
public void putInCache(java.lang.String strKey, java.lang.String path)Description copied from interface:IPathCacheServicePut a path in cache- Specified by:
putInCachein interfaceIPathCacheService- Parameters:
strKey- the cache keypath- the path html
-
processPageEvent
public void processPageEvent(PageEvent event)
Description copied from interface:PageEventListenerProcess a page event- Specified by:
processPageEventin interfacePageEventListener- Parameters:
event- The event to process
-
-