Package org.ametys.web.cache
Class InvalidateCacheOnPageModificationObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.cache.AbstractCacheObserver
org.ametys.web.cache.AbstractSiteCacheObserver
org.ametys.web.cache.InvalidateCacheOnPageModificationObserver
- All Implemented Interfaces:
Observer,LogEnabled,Prioritizable,Supporter<Event>,Serviceable
Observer for observing page creation or modification in order to
invalidate cache on front-office.-
Field Summary
Fields inherited from class org.ametys.web.cache.AbstractSiteCacheObserver
_cachePolicy, _repositoryFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SiteRetrieves the site needed for accessing the front-office.protected void_internalObserve(Event event, Site site, javax.jcr.Session liveSession) Observes the event with access to the target site and live workspace.booleanCheck if an element is supportedMethods inherited from class org.ametys.web.cache.AbstractSiteCacheObserver
observe, serviceMethods inherited from class org.ametys.web.cache.AbstractCacheObserver
getPriorityMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
InvalidateCacheOnPageModificationObserver
-
-
Method Details
-
supports
Description copied from interface:SupporterCheck if an element is supported- Parameters:
event- The element- Returns:
trueif the element is supported,falseotherwise
-
_getSite
Description copied from class:AbstractSiteCacheObserverRetrieves the site needed for accessing the front-office.- Specified by:
_getSitein classAbstractSiteCacheObserver- Parameters:
event- the event.- Returns:
- the site or
nullif not found.
-
_internalObserve
protected void _internalObserve(Event event, Site site, javax.jcr.Session liveSession) throws Exception Description copied from class:AbstractSiteCacheObserverObserves the event with access to the target site and live workspace.- Specified by:
_internalObservein classAbstractSiteCacheObserver- Parameters:
event- the event.site- the site.liveSession- the session to the workspace live.- Throws:
Exception- if an error occurs.
-