Caching AEM components | Community
Skip to main content
kishore_polsani
Level 4
December 1, 2016
Solved

Caching AEM components

  • December 1, 2016
  • 6 replies
  • 4094 views

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.???

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kishore_polsani

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.

6 replies

Feike_Visser1
Adobe Employee
Adobe Employee
December 1, 2016

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

kishore_polsani
Level 4
December 1, 2016

Thanks Feike, is there any official documentation with example?

Feike_Visser1
Adobe Employee
Adobe Employee
December 1, 2016
Adobe Employee
December 1, 2016

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

kishore_polsani
Level 4
December 3, 2016

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.

kishore_polsani
kishore_polsaniAuthorAccepted solution
Level 4
December 5, 2016

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.