3

In the official documentation for CIL caching for Java, it is stated how to turn on caching and how to point it to a custom config file, but there isn't any additional information on what the actual content of the ehcache.xml (or the optionally referenced config file) should be.

In contrast, the .NET CIL caching has detailed info on how it should be configured.

Is this level of configuration even possible in the Java implementation of CIL caching and does a reference of the config file exist anywhere? I am especially interested on how to treat different "item types", ie. CIL-BROKER CIL-DYNAMIC CIL-LINKING and CIL-INTERNAL in ehcache.


UPDATE: Updated the question according to Velu's answer.

AFAIK - CIL - Java Caching

Uses EHCache

That is my understanding as well. You could use Redis, but the default is ehcache.

Time based caching, NO invalidation

True.

Limited OOTB config

I would assume so based on the thin documentation.

Recommendations

Set max-graph-object-size

Do you have a source for this recommendation?


Also, the remainder of the answer is regarding DXA 2.2, however, we don't have DXA 2.2. but rather a "plain" Java based solution. Most (if not all) of the caches mentioned are DXA specific (page, entity, output, etc.), while the 'queryCache' which is for GraphQL queries isn't even applicable, it doesn't exist in CD 8.5.
CIL itself is not aware of these concepts, It is the DXA app which will create these caches, source: see here, it's explicitly said at ~20:30.

What I am interested in are any of the caches which already exist in the CIL cache implementation itself, like for example broker query results, link resolving results, etc. similar like in the .NET version.

Again the CIL version (and CD) is 8.5.

1 Answer 1

2

AFAIK - CIL - Java Caching

  • Uses EHCache
  • Time based caching, NO invalidation
  • Limited OOTB config
  • Recommendations
    • Up the heap size by MB, not by entries
    • Set max-graph-object-size
<?xml version="1.0" encoding="UTF-8"?>
<config
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
    xmlns='http://www.ehcache.org/v3'
    xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.1.xsd">   
    <heap-store>
            <max-object-graph-size>100000</max-object-graph-size>
    </heap-store>
    <cache alias="defaultCache">
        <expiry>
            <ttl unit="seconds">3600</ttl>
        </expiry>
        <heap unit="MB">500</heap>
    </cache>
</config>

The default multiple levels of data caches available based on this you can fine tune your Java DXA 2.2 web applicaiton caching:

  • Default - This is default cache for the DXA Java web application.
  • pageModels - This cache stores all strongly typed Page Models
  • entityModels - This cache stores all strongly typed Entity Models
  • staticContentItems - This cache stores file descriptors for static files, such as Javascript, image and CSS files
    • eg. version.json or anything in the system folder
  • resolvedLinks - This cache stores resolved links.
  • queryCache - This cache stores GraphQL queries, which are primarily used for Dynamic Lists.
  • Output - This cache stores fully rendered HTML. The output for dynamic content.

I hope it helps.

2
  • updated my question
    – Atila Sos
    May 6, 2020 at 10:14
  • @AtilaSos - Recommentation - There is no source of sdl documentation as far as i'm aware. This recommentation I got it from R&D (from Raimond).
    – Velmurugan
    May 6, 2020 at 19:48

Your Answer

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

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