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

Dispatcher cache - SPA pages

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

271 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

271 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
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
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct Reply

172 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct Reply

172 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile
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.