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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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, SitemapElement parent, String pageId, String pathInSitemap) Invalidate cache on a page deletionvoid
Invalidate cache on a minor page change.void
Invalidate cache when a page is modified.void
invalidateCacheOnPageMove
(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: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
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, SitemapElement 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, SitemapElement 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
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
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
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
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
-