0

We are using SDL Web 8.5 and DXA 2.0 Java for our website. We would like to incorporate client-side (Content Interaction Library(CIL)) caching to improve site performance. Is there any example or documentation available to do it?

1 Answer 1

2

Refer to the SDL Documentation Content Delivery client configuration of ServiceConfig for Redis CIL cache.

Example:

<!--
A configuration sample for using Distributed Caching with Redis.
Please update the following fields:
    CacheUri - in case of Redis is set to Redis hostname with a port number;
    CacheClientId - should be the same for a bunch of CIL's which meant to be one environment;
    CachePassword - Redis cache password. Delete this field if Redis is used without a password;
-->
<ServiceConfig CacheEnabled="true" CacheUri="localhost:6379"
               ConnectionTimeout="10000" CacheExpirationDuration="600" ServiceAvailabilityCheck="true"
               CacheProviderClass="com.sdl.web.client.cache.distributed.RedisCacheProvider"
               CacheConnectionTimeout="10000"
               CacheClientId="defaultCacheClientId"
               CachePassword="encrypted:HzfQh9wYwAKShDxCm4DnnBnysAz9PtbDMFXMbPszSVY="
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="schemas/cd_client_conf.xsd">

    <DiscoveryService ServiceUri="http://localhost:8082/discovery.svc"/>
    <TokenService ClientId="cduser" ClientSecret="encrypted:o/cgCBwmULeOyUZghFaKJA=="/>
</ServiceConfig>

Configuring web application caching (Java)

Updated:

Comparison Ehcache vs. Redis

I hope it helps.

2
  • Velmurugan thanks for your reply. Can u please also tell us is there any advantage using Redis cache instead of echache (default caching) Commented Apr 9, 2019 at 7:11
  • Updated the answer to provided the reference link for Ehcache vs Redis comparison
    – Velmurugan
    Commented Apr 9, 2019 at 10:11

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.