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 a
CacheInvalidationPolicy-
Field Summary
Fields inherited from interface org.ametys.web.cache.CacheInvalidationPolicy
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinvalidateCacheOnContentCommented(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, SitemapElement parent, String pageId, String pathInSitemap) Invalidate cache on a page deletionvoidInvalidate cache on a minor page change.voidInvalidate cache when a page is modified.voidinvalidateCacheOnPageMove(Page page, SitemapElement oldParent, String oldPathInSitemap) Invalidate cache on a page moveMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
DefaultCacheInvalidationPolicy
public DefaultCacheInvalidationPolicy()
-
-
Method Details
-
invalidateCacheOnPageModification
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
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, SitemapElement 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, SitemapElement 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
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
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
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
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
-