Caching Header and Footer without SDI implementation



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


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

AEM 6.4 Dispatcher SDI

Accepted Solutions (1)

Accepted Solutions (1)




Hi @snbaem 


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 There is OSGI property that needs to be set to JSI


Refer article to know how javascript based SDI works.


Hope it helps!



Answers (0)