Interface PageElementCachePolicy

All Known Implementing Classes:
AbstractACLPageElementCachePolicy, AbstractSimplePageElementCachePolicy, 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.
  • Method Details

    • 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.