Package org.ametys.web.cache
Class DefaultCacheInvalidationPolicy
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.cache.DefaultCacheInvalidationPolicy
-
- All Implemented Interfaces:
LogEnabled
,CacheInvalidationPolicy
public class DefaultCacheInvalidationPolicy extends AbstractLogEnabled implements CacheInvalidationPolicy
Default implementation of aCacheInvalidationPolicy
-
-
Field Summary
-
Fields inherited from interface org.ametys.web.cache.CacheInvalidationPolicy
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultCacheInvalidationPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
invalidateCacheOnContentCommented(Page page, Content content)
Invalidate cache on a content commentedvoid
invalidateCacheOnContentDeletion(Site site, String contentId)
Invalidate cache on a content deletedvoid
invalidateCacheOnContentModification(Site site, Content content)
Invalidate cache on a content modficationvoid
invalidateCacheOnContentReactionChanged(Page page, Content content)
Invalidate cache when a content reaction changedvoid
invalidateCacheOnPageDeletion(Site site, PagesContainer parent, String pageId, String pathInSitemap)
Invalidate cache on a page deletionvoid
invalidateCacheOnPageMinorChange(Page page)
Invalidate cache on a minor page change.void
invalidateCacheOnPageModification(Page page)
Invalidate cache when a page is modified.void
invalidateCacheOnPageMove(Page page, PagesContainer oldParent, String oldPathInSitemap)
Invalidate cache on a page move-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
DefaultCacheInvalidationPolicy
public DefaultCacheInvalidationPolicy()
-
-
Method Detail
-
invalidateCacheOnPageModification
public void invalidateCacheOnPageModification(Page page) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache when a page is modified. The page modification can have triggered the modification of other pages (ex: page addition, content zone item deletion).- Specified by:
invalidateCacheOnPageModification
in interfaceCacheInvalidationPolicy
- Parameters:
page
- the modified page- Throws:
Exception
- if an error occurs
-
invalidateCacheOnPageMinorChange
public void invalidateCacheOnPageMinorChange(Page page) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache on a minor page change. The change cannot have triggered the modification of other pages (ex: service modification).- Specified by:
invalidateCacheOnPageMinorChange
in interfaceCacheInvalidationPolicy
- Parameters:
page
- the modified page- Throws:
Exception
- if an error occurs
-
invalidateCacheOnPageDeletion
public void invalidateCacheOnPageDeletion(Site site, PagesContainer parent, String pageId, String pathInSitemap) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache on a page deletion- Specified by:
invalidateCacheOnPageDeletion
in interfaceCacheInvalidationPolicy
- Parameters:
site
- the siteparent
- the parent page or sitemappageId
- the page idpathInSitemap
- path of the page in sitemap- Throws:
Exception
- if an error occurs
-
invalidateCacheOnPageMove
public void invalidateCacheOnPageMove(Page page, PagesContainer oldParent, String oldPathInSitemap) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache on a page move- Specified by:
invalidateCacheOnPageMove
in interfaceCacheInvalidationPolicy
- Parameters:
page
- the page movedoldParent
- the old parentoldPathInSitemap
- the old path in sitemap- Throws:
Exception
- if an error occurs
-
invalidateCacheOnContentCommented
public void invalidateCacheOnContentCommented(Page page, Content content) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache on a content commented- Specified by:
invalidateCacheOnContentCommented
in interfaceCacheInvalidationPolicy
- Parameters:
page
- the pagecontent
- the commented content- Throws:
Exception
- if an error occurs
-
invalidateCacheOnContentReactionChanged
public void invalidateCacheOnContentReactionChanged(Page page, Content content) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache when a content reaction changed- Specified by:
invalidateCacheOnContentReactionChanged
in interfaceCacheInvalidationPolicy
- Parameters:
page
- the pagecontent
- the commented content- Throws:
Exception
- if an error occurs
-
invalidateCacheOnContentDeletion
public void invalidateCacheOnContentDeletion(Site site, String contentId) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache on a content deleted- Specified by:
invalidateCacheOnContentDeletion
in interfaceCacheInvalidationPolicy
- Parameters:
site
- the sitecontentId
- the content id- Throws:
Exception
- if an error occurs
-
invalidateCacheOnContentModification
public void invalidateCacheOnContentModification(Site site, Content content) throws Exception
Description copied from interface:CacheInvalidationPolicy
Invalidate cache on a content modfication- Specified by:
invalidateCacheOnContentModification
in interfaceCacheInvalidationPolicy
- Parameters:
site
- the sitecontent
- the content- Throws:
Exception
- if an error occurs
-
-