0
@Data
@NoOutputCache
@EqualsAndHashCode(callSuper = true)
public class NewsList extends AbstractEntityModel {

....

}

I am using SDL 9.6 and DXA 2.2.33 for our website. I am generating a news list page with 10 items and pagination links. I have added @NoOutputCache in the modal class and content output caching is enabled. still, I am getting first-page output for all pagination links

is there any way to remove the page output from the content caching?

1
  • @Saurabha Jha - I assume it's java dxa?
    – Velmurugan
    Commented Oct 5, 2023 at 16:02

1 Answer 1

1

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:

  1. 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.

  2. 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:

dxa.caching.disabled.caches=output

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.