We are using SDL Web 8.5 and DXA CTP 2.0 Java. DXA Model Service is configured on Linux server. When we publish any Page or Component the cache for PageModel and EntityModels are not getting invalidated until we wait for around 1 hour or restart the Model Service. Ecache-cli.config is as below

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.1.xsd">

    <cache-template name="default">
            <ttl unit="seconds">3600</ttl>
        <heap unit="entries">10000</heap>

    <cache alias="sitemaps" uses-template="default"/>
    <cache alias="pageModels" uses-template="default"/>
    <cache alias="entityModels" uses-template="default"/>
    <cache alias="config" uses-template="default"/>
    <cache alias="defaultCache" uses-template="default"/>

3 Answers 3


The default configuration of all caches in the DXA source code is set on production/live values, to ensure the performance is optimal in case no changes are being made.

However, when you want to setup a development or staging environment with XPM, then you should disable these caches, as they indeed make you wait for up to an hour before your changes are visible.

Please note that yesterday the DXA 2.0 GA version was released, so I strongly advise you to upgrade to that, as the CTP releases were only meant as a preview, and you should no longer use them.

When you follow the documentation, and install the Model Service as described there, you will notice you can specify a deployType parameter. Setting this to Live (default) or Staging will give you different cache settings automatically.

If you want to configure everything manually, there is a separate topic in the documentation about caching and cache settings of the web application and the Model Service.


The DXA Model Service uses CIL caching. This cache is not triggered to invalidate entries when a page or component presentation is published or unpublished. It is a purely autonomous, time-based caching mechanism.


Alternatively, you can setup the ActiveMQ cache on Content Service for triggering to invalidating the entries when a page or component presentation is published or unpublished to clear the caching immediately also needs deployer to enable ActiveMQ caching configuration. In this case, in your DXA web app, you can keep the TTL cache settings value minimum, since it's cache on CIS service level still you can achieve high performance.

Refer to my blog article for How to setup ActiveMQ caching on CIS

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.