Legacy Knowledge Base
Published Jun. 30, 2025

How does the fragment caching work?

Written By

Rita Schaff

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

  • When using fragments, does the cache on content update perform a proper flush?
  • How does fragment caching work in general?

Environment

  • DXP 7.3

Resolution

  • If we have a dynamic fragment, and if caching is turned on, it is evaluated on the first load and after that, the content is cached.
  • If caching is turned off, the content is expected to be evaluated all the time - this is good for testing, and developing fragments but not recommended in production since (depending on the use case) it can cause performance issues.
    Turning_caching_on-off.png
  • We suggest storing the dynamic parts in the fragment itself.
  • For example, if we are using value mapping, where I want to map a selection option - the new content will not be loaded due to the aforementioned behavior.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base