Expand my Community achievements bar.

Dispatcher cache - SPA pages

Avatar

Community Advisor

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?

1 Reply

Avatar

Employee Advisor

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.