Class AbstractSimplePageElementCachePolicy

    • Method Detail

      • shouldClearCache

        public final PageElementCachePolicy.PolicyResult shouldClearCache​(String workspace,
                                                                          Site site,
                                                                          String pageElementType,
                                                                          Event event)
        Description copied from interface: PageElementCachePolicy
        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.
        Specified by:
        shouldClearCache in interface PageElementCachePolicy
        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.
      • _supports

        protected boolean _supports​(Event event,
                                    String workspace)
        Checks if the event is supported.
        Parameters:
        event - The event
        workspace - The JCR workspace.
        Returns:
        If true, the cache should be clear
      • _getRemovingCacheEventIds

        protected abstract List<String_getRemovingCacheEventIds​(String workspace)
        Returns all event ids for which the cache should be removed.
        Parameters:
        workspace - the current JCR workspace.
        Returns:
        all event ids for which the cache should be removed.