Expand my Community achievements bar.

SOLVED

Sling Dynamic Include + Dispatcher + Component Caching !!

Avatar

Level 2

Hello,

I have recently implemented SDI based header and footer in my project. And everything looks good. But I wonder is there any way I can avoid hitting AEM publish/author to construct the HTML markup for header/footer. As per the documentation and per the great minds thoughts in this thread, I understand that there won't be much impact on the performance, But I still feel if there is way to avoid hitting AEM. Please note, I am referring to the synthetic resources.

I have followed this route - <sly data-sly-resource="/content/appname/en/jcr:content/heaedernavbar.html"></sly>

And I can see the following tag in cached file in webserver doc root - <!--#include virtual="/content/appname/en/jcr:content/heaedernavbar.cache.html" --> 

I can see heaedernavbar.cache.html getting created at docroot/html/content/appname/en/jcr:content location. 

Hope this way, I can have the cached file at a central location and using the ACS commons dispatcher flush rules in the OSGI configs I can flush the cache when needed without having to worry about entire content of the site. Please suggest if there is any other better solution. 

Thanks,

Suresh R

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Given the information you provided it looks good to me. You offloaded the rendering of the header and include it to the page on the dispatcher using SSI.

Jörg

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Given the information you provided it looks good to me. You offloaded the rendering of the header and include it to the page on the dispatcher using SSI.

Jörg

Avatar

Level 2

Thanks Joerg for your time.

Yes its working fine with no issues so far.