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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

stores.init.js | every call is hitting publisher - can we cache this call

Avatar

Level 4
Hi all,
 
Was reviewing publisher logs on server.
 
Noticed that below "store.init.js" call is hitting publisher again and again. 

/etc/clientcontext/default/content/jcr:content/stores.init.js?path=index&cq_ck=1456299446600

 
This call is not cached on dispatcher since it has query parameter and also cache busting parameter cq_ck.
 
This call is generated when we have clientcontext enabled on page.
 
Will AEM continue to work normal if I cache this file on dispatcher ?
 
Just trying to save hits on publishers.
 
Thanks in advance.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

store.init.js is responsible for getting the segments and resolving the same which could be different for each request and hence it has to hit the publish instance to do the same. However, the experience for the resolved segment would be cached and served from the dispatcher.

View solution in original post

0 Replies

Avatar

Community Advisor

rohitspathak123 wrote...

Hi all,
 
Was reviewing publisher logs on server.
 
Noticed that below "store.init.js" call is hitting publisher again and again. 

/etc/clientcontext/default/content/jcr:content/stores.init.js?path=index&cq_ck=1456299446600

 
This call is not cached on dispatcher since it has query parameter and also cache busting parameter cq_ck.
 
This call is generated when we have clientcontext enabled on page.
 
Will AEM continue to work normal if I cache this file on dispatcher ?
 
Just trying to save hits on publishers.
 
Thanks in advance.

 

If you using personalization using segmentation or target then you can't cache this otherwise you can change caching rule in dispatcher to enable the caching for this.

Avatar

Correct answer by
Community Advisor

store.init.js is responsible for getting the segments and resolving the same which could be different for each request and hence it has to hit the publish instance to do the same. However, the experience for the resolved segment would be cached and served from the dispatcher.