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,Cloneable,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 StringgetFromCache(String strKey)Gets an object from the cacheStringgetKey(String strXPageName, int nMode, String strTitlesUrls, javax.servlet.http.HttpServletRequest request)Constructs a cache keyStringgetKey(String strXPageName, int nMode, javax.servlet.http.HttpServletRequest request)Constructs a cache keyStringgetName()Returns the Service namevoidprocessPageEvent(PageEvent event)Process a page eventvoidputInCache(String strKey, 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 String getName()
Description copied from interface:LuteceServiceReturns the Service name- Specified by:
getNamein interfaceLuteceService- Returns:
- The name as a String
-
getKey
public String getKey(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 String getKey(String strXPageName, int nMode, 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 String getFromCache(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(String strKey, 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
-
-