In our application we have enabled the Tridion Object cache in cd_storage to true as well as Ehcache and timeToLive is 300 sec. Now the question is will the ehcache re-build the cache every 5 min (if we keep timetolive = 300 sec) or for every 5 minutes it just checks the item is update or not.

can anyone explain how the ehcache works and if both Tridion object cache and ehcache are enabled will there be any conflicts?

  • Adding the dd4t tag because if I'm not mistaking the ehcache is implemented in DD4T. Commented Jun 17, 2016 at 7:15

2 Answers 2


I can't tell you much about how Ehcache works itself, I don't know those details, so will leave that up to somebody else to explain.

But in general there are two different caches on two different parts of the application. The Tridion object cache reduces the amount of roundtrips to the broker database, so you should always have that enabled on a production environment.

Since DXA only fetches Page and Component content out of the Broker (via the DD4T provider) which is in JSON format, and the web application requires a view model, this needs to be built. That together with the rendering of the views is things you will want to cache too (as is common in any type of web application). Hence the implementation of a cache in DD4T, which is what DXA reuses.

Further details I'll leave up to somebody else to explain, since I don;t know too much implementation details of the Java side.


The Java version of DXA and DD4T use EHCache to cache deserialized DD4T object models. By default, this is a simple Time-To-Live cache, meaning that entries stay in the cache for the configured TTL and the system won't detect changes to cached items for that duration. So, with a TTL of 5 minutes, it may take up to 5 minutes till a change is visible on your website.

The Tridion Object Cache is used to cache the Tridion Objects which are obtained from the database. This cache can be configured so that cached items get invalidated as soon as they change, so that the cache lifetime can be very long without delays in item changes.

It is very common to have both caches enabled: the Tridion Object Cache to prevent unnecessary, expensive DB queries and EHCache to prevent unnecessary DD4T deserialization. You should configure the EHCache TTL so that the potential delay in changes being visible is acceptable for your environment.

Note that the DD4T deserialization process is normally not very expensive, so if you already have Tridion Object Cache enabled, it is not such a problem if an item is evoked from EHCache after its TTL expired.

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.