Class PageCacheUtil


  • public class PageCacheUtil
    extends java.lang.Object
    Utility class for dealing with page cache.
    Since:
    10.1.0
    Version:
    $Revision: 21880 $ $Date: 2018-09-21 17:07:19 -0300 (Fri, 21 Sep 2018) $
    • Constructor Detail

      • PageCacheUtil

        public PageCacheUtil()
    • Method Detail

      • getPageByPageCache

        public static PageConfig getPageByPageCache​(SessionConfig sessionConfig,
                                                    PageCacheConfig pageCacheConfig,
                                                    ITransaction transaction)
                                             throws PortalException
        Returns the page that will be rendered when accessing a web resource.
        Parameters:
        sessionConfig - the user session information.
        pageCacheConfig - the page cache config.
        transaction - the transaction for persistence access.
        Returns:
        the page.
        Throws:
        PortalObjectNotFoundException - if no page was found for the specified web resource.
        java.lang.IllegalArgumentException - if webResource is of an unsupported class.
        PortalException
        Since:
        10.1.0
      • isIncludedInAutomaticBulkExpiration

        public static boolean isIncludedInAutomaticBulkExpiration​(PageCacheConfig pageCacheConfig)
        Returns whether the given page cache is included in automatic bulk operation.
        Parameters:
        pageCacheConfig - the page cache.
        Returns:
        whether the given page cache is included in automatic bulk operation.
        Since:
        10.2.0
      • getPageCacheGeneratorUserAgent

        public static java.lang.String getPageCacheGeneratorUserAgent()
                                                               throws PortalException
        Returns the user agent string to be used when requesting a page for cache generation.
        Returns:
        the user agent string to be used when requesting a page for cache generation.
        Throws:
        PortalException
        Since:
        11.0.0