Dispatcher cache - SPA pages

Avatar

Avatar

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

17-12-2020

How much Dispatcher can help in caching the SPA page?

  1. I have a non SPA page built with Core components
  2. Similar SPA page with same set of components

In case 1, Dispatcher will cache entire HTML(with content) of page.

How dispatcher works in case 2?

In this scenario which page will perform better?

Replies

Avatar

Avatar

kunal23

MVP

Avatar

kunal23

MVP

kunal23
MVP

17-12-2020

In case2, the SPA page itself will not contain any content in the source as it just includes basic skeleton page markup only. All other components on the page are rendered by the JavaScript code. The JS code makes calls to JSON endpoints in AEM to fetch the data of the components included on the page. 

So it is recommended you cache those JSONs along with the SPA pages markup.