To address this, you need to understand how caching works in DXA Java.
DXA Java Web applications use
EHCache for caching and rely on CIL (Content Interaction Library) Java Cache for handling caching behavior. By default, DXA employs time-based caching without automatic publishing invalidation.
To configure the caching behavior and potentially resolve your issue, you can make adjustments to the following configuration files:
cd_client_config.xml and ehcache.xml: Check these files for any caching-related configurations. Ensure that caching is configured correctly on the delivery side.
dxa.properties: In this file, you can specify which caches to disable. The property
dxa.caching.disabled.caches allows you to disable specific caches. For your case, you can add "output" to this property to disable the HTML output caching. The updated configuration would look like this:
Make sure to restart your application after making these changes to ensure that the new caching configuration takes effect.
Additionally, it's essential to evaluate whether disabling the output cache is the right approach for your specific use case, as it can impact the performance of your website. Consider your caching requirements and fine-tune your caching strategy accordingly.
Reference to RWS Documentation for Disabling individual web application caches (Java)
I hope it helps