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 voidinvalidateCacheOnContentCommented(Page page, Content content)Invalidate cache on a content commentedvoidinvalidateCacheOnContentDeletion(Site site, String contentId)Invalidate cache on a content deletedvoidinvalidateCacheOnContentModification(Site site, Content content)Invalidate cache on a content modficationvoidinvalidateCacheOnContentReactionChanged(Page page, Content content)Invalidate cache when a content reaction changedvoidinvalidateCacheOnPageDeletion(Site site, PagesContainer parent, String pageId, String pathInSitemap)Invalidate cache on a page deletionvoidinvalidateCacheOnPageMinorChange(Page page)Invalidate cache on a minor page change.voidinvalidateCacheOnPageModification(Page page)Invalidate cache when a page is modified.voidinvalidateCacheOnPageMove(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:CacheInvalidationPolicyInvalidate 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:
invalidateCacheOnPageModificationin interfaceCacheInvalidationPolicy- Parameters:
page- the modified page- Throws:
Exception- if an error occurs
-
invalidateCacheOnPageMinorChange
public void invalidateCacheOnPageMinorChange(Page page) throws Exception
Description copied from interface:CacheInvalidationPolicyInvalidate cache on a minor page change. The change cannot have triggered the modification of other pages (ex: service modification).- Specified by:
invalidateCacheOnPageMinorChangein 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:CacheInvalidationPolicyInvalidate cache on a page deletion- Specified by:
invalidateCacheOnPageDeletionin 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:CacheInvalidationPolicyInvalidate cache on a page move- Specified by:
invalidateCacheOnPageMovein 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:CacheInvalidationPolicyInvalidate cache on a content commented- Specified by:
invalidateCacheOnContentCommentedin 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:CacheInvalidationPolicyInvalidate cache when a content reaction changed- Specified by:
invalidateCacheOnContentReactionChangedin 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:CacheInvalidationPolicyInvalidate cache on a content deleted- Specified by:
invalidateCacheOnContentDeletionin 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:CacheInvalidationPolicyInvalidate cache on a content modfication- Specified by:
invalidateCacheOnContentModificationin interfaceCacheInvalidationPolicy- Parameters:
site- the sitecontent- the content- Throws:
Exception- if an error occurs
-
-