Legacy Knowledge Base
Published Jun. 30, 2025

Caches for Widget Pages and Content Pages

Written By

Daniel Couso

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • There is not an easy way to know how many caches are, which their lifetime is, and how they can be cleared.

Environment

  • Quarterly Releases: 2023.Q3, 2023.Q4, 2023.Q1
  • Liferay DXP 7.3, 7.4

Resolution

  • Widget Pages can be cached by CacheFilter's cache.
    • This cache's lifetime is 600 seconds.
    • This cache can be cleared by executing the following Groovy script:
      com.liferay.portal.servlet.filters.cache.CacheUtil.clearCache();
  • Content pages' fragments can be cached if those fragments are previously marked as Cacheable.
    • This cache's lifetime is 600 seconds.
    • This cache can be cleared by executing the following Groovy script.
      def portalCache = com.liferay.portal.kernel.cache.PortalCacheHelperUtil.getPortalCache(
      com.liferay.portal.kernel.cache.PortalCacheManagerNames.MULTI_VM, com.liferay.fragment.model.FragmentEntryLink.class.getName());
      if (portalCache != null) {
      portalCache.removeAll();
      }
  • NOTE: Clearing these caches may have a temporary impact on performance until the cache is warmed up again.
Did this article resolve your issue ?

Legacy Knowledge Base