Caching Header and Footer without SDI implementation | Community
Skip to main content
Shubham_borole
Community Advisor
Community Advisor
July 17, 2020
Solved

Caching Header and Footer without SDI implementation

  • July 17, 2020
  • 1 reply
  • 1770 views

Hello All,

 

I am trying to see if it is possible to cache the header and footer in dispatcher so that when any page is called for the first time, at least the header and footer is used from the dispatcher cache created from first page that was hit on the site.

I found that if we do <sly data-sly-resource="/content/project/en/home/jcr:content/siteheader/header.html"></sly> and implement SDI, we can see a cached file in dispatcher such as header.cache.html.

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/sling-dynamic-include-dispatcher-component-caching/qaq-p/207620 and https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/ssi-for-header-footer-in-aem-any-issues/qaq-p/181417 seem to be talking about same where SDI implementation is used.

 

My query is that can we still achieve separate node based caching without SDI implementation? 

Or

Can we still achieve separate node based caching with SDI implementation, but no SSI implementation? Meaning if page is cached in Akamai for eg it will never hit the dispatcher to get the separate cached call, unless the Akamai cache is cleared. 
It seems its not since the whole page.html will be cached and dispatcher won't know to cache the desired node.html into its doc root.

 

We are using AEM 6.4

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 Nupur_Jain

Hi @shubham_borole 

 

For your case, you can use SDI with "JSI" include type. JSI means it is javascript based sling dynamic include. It will make a call to required header/footer html from clientside means neither akamai not dispatcher has to  resolve these includes.

Both Header/Footer node request HTML can then be cached on akamai/dispatcher.

 

Read more from https://docs.adobe.com/content/help/en/experience-manager-learn/foundation/development/set-up-sling-dynamic-include.html. There is OSGI property that needs to be set to JSI

include-filter.config.include-type="JSI"

Refer https://www.aemquickstart.in/2016/12/sling-dynamic-include.html article to know how javascript based SDI works.

 

Hope it helps!

Thanks!

Nupur

1 reply

Nupur_Jain
Adobe Employee
Nupur_JainAdobe EmployeeAccepted solution
Adobe Employee
July 17, 2020

Hi @shubham_borole 

 

For your case, you can use SDI with "JSI" include type. JSI means it is javascript based sling dynamic include. It will make a call to required header/footer html from clientside means neither akamai not dispatcher has to  resolve these includes.

Both Header/Footer node request HTML can then be cached on akamai/dispatcher.

 

Read more from https://docs.adobe.com/content/help/en/experience-manager-learn/foundation/development/set-up-sling-dynamic-include.html. There is OSGI property that needs to be set to JSI

include-filter.config.include-type="JSI"

Refer https://www.aemquickstart.in/2016/12/sling-dynamic-include.html article to know how javascript based SDI works.

 

Hope it helps!

Thanks!

Nupur

Shubham_borole
Community Advisor
Community Advisor
July 17, 2020

Thanks for the quick response. Although we have no-js implemented pages and no SDI, I will take a look at the links.