stores.init.js | every call is hitting publisher - can we cache this call | Community
Skip to main content
Level 4
February 26, 2016
Solved

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

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.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
February 26, 2016

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.

3 replies

Level 4
March 9, 2016

Thanks Amit & Bsloki for your reply.

Translate
Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
February 26, 2016

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.

Translate
Amit_Kumar
Level 10
February 26, 2016

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.

Translate