Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Sling Dynamic Include + Dispatcher + Component Caching !!

sureshr31455031
Level 2
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
Jörg_Hoh
Correct answer by
Employee
Employee

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
Jörg_Hoh
Correct answer by
Employee
Employee

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

sureshr31455031
Level 2
Level 2

Thanks Joerg for your time.

Yes its working fine with no issues so far.