Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Caching AEM components

Avatar

Level 4

Hi,

I just want to know how we can achieve component level caching. On home page, logged in user name should be dynamic and should not be cached and rest other components should be cached.We are using 3rd party login to get access to the site.

For example refer attached image captured from https://localhost:5433/content/geometrixx-outdoors/en/men.html

Note: All the components are developed in sightly. 

Is there a way to make some sightly components on page to be cached for certain time.???

1 Accepted Solution

Avatar

Correct answer by
Level 4

SDI is working fine now. I have removed "/apps/" string from the "Resource Types" configuration. Here resource type should not start with either /apps/ or /libs/. Please check my blogpost here.

View solution in original post

6 Replies

Avatar

Employee

Best is then to use Sling Dynamic Include. This uses SSI to achieve this.

Avatar

Level 4

Thanks Feike, is there any official documentation with example?

Avatar

Employee

Sling Dynamic Include (SDI) project has been contributed to the Apache Sling project as an extension.: https://github.com/apache/sling/tree/trunk/contrib/extensions/sling-dynamic-include

Avatar

Level 4

Hi,

I followed sling dynamic include documentation provided in github, but its not working. Though I have enabled the "Add comment" configuration in configMgr and com.cognifide.cq.sling-dynamic-include bundle is in active state, I don't see anything related to SDI in logs.

I am trying to include geometrixx title component using SDI. I have added the required configurations in configMgr as well as in dispatcher.any file. When I look at the cached page, it still contains the title text, i.e title is getting cached.

I have attached all the configs with screenshots and log files.

Kindly let me know if I miss anything here.

Avatar

Correct answer by
Level 4

SDI is working fine now. I have removed "/apps/" string from the "Resource Types" configuration. Here resource type should not start with either /apps/ or /libs/. Please check my blogpost here.