Package org.ametys.web.cache.pageelement
Interface PageElementCachePolicy
-
- All Known Implementing Classes:
AbstractACLPageElementCachePolicy
,AbstractSimplePageElementCachePolicy
,BlogVirtualPagesCachePolicy
,BlogVirtualPagesWithCommentsCachePolicy
,CalendarServiceCachePolicy
,ContentZoneItemCachePolicy
,ExplorerResourcesServiceCachePolicy
,FilteredContentsInputDataCachePolicy
,FilteredContentsServiceCachePolicy
,FilteredPagesInputDataCachePolicy
,GlossaryContentsCachePolicy
,GlossaryServiceCachePolicy
,InsertProgramServiceCachePolicy
,IsolatedServiceCachePolicy
,LinkDirectoryServiceCachePolicy
,NewsletterArchiveServiceCachePolicy
,OdfProgramListServiceCachePolicy
,OdfVirtualPagesCachePolicy
,SearchPagesServiceCachePolicy
,SearchServiceCachePolicy
,SitemapServiceCachePolicy
,SurveyDisplayServiceCachePolicy
,TagCloudServiceCachePolicy
,UGCVirtualPagesCachePolicy
,UserDirectoryVirtualPagesCachePolicy
,WordCloudServiceCachePolicy
public interface PageElementCachePolicy
Used by the event processing to know whether cached content should be kept or cleared.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PageElementCachePolicy.PolicyResult
Processing result.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>
getPageElementTypes()
Returns the types of the associated page elements.PageElementCachePolicy.PolicyResult
shouldClearCache(String workspace, Site site, String pageElementType, String elementId, Event event)
Second pass of event processing, at the Page level.
This method is only called if the first pass resulted with NEED_MORE_INFORMATION.PageElementCachePolicy.PolicyResult
shouldClearCache(String workspace, Site site, String pageElementType, Event event)
First pass of event processing, at the type level.
Returning NEED_MORE_INFORMATION eventually leads to the second pass, which is more precise, and also depends on a particular element, but is more costly to compute.
Returning null means that this policy declares itself as not concerned by the current event.
-
-
-
Method Detail
-
getPageElementTypes
Set<String> getPageElementTypes()
Returns the types of the associated page elements.- Returns:
- the types of the associated page elements.
-
shouldClearCache
PageElementCachePolicy.PolicyResult shouldClearCache(String workspace, Site site, String pageElementType, Event event)
First pass of event processing, at the type level.
Returning NEED_MORE_INFORMATION eventually leads to the second pass, which is more precise, and also depends on a particular element, but is more costly to compute.
Returning null means that this policy declares itself as not concerned by the current event.- Parameters:
workspace
- the current JCR workspace.site
- the current site.pageElementType
- the page element type.event
- the current event.- Returns:
- the policy result or null if this policy declares itself as not concerned.
-
shouldClearCache
PageElementCachePolicy.PolicyResult shouldClearCache(String workspace, Site site, String pageElementType, String elementId, Event event)
Second pass of event processing, at the Page level.
This method is only called if the first pass resulted with NEED_MORE_INFORMATION. If this method also returns NEED_MORE_INFORMATION, it will be interpreted as REMOVE.- Parameters:
workspace
- the current JCR workspace.site
- the current site.pageElementType
- the page element type.elementId
- the current element id.event
- the current event.- Returns:
- the policy result.
-
-