Skip to main content
Level 4
Feb 26, 2016 4:04 AM UTC
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
Feb 26, 2016 6:02 AM UTC

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

Amit_Kumar
Level 10
Feb 26, 2016 4:37 AM UTC

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
Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
Feb 26, 2016 6:02 AM UTC

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
Level 4
Mar 9, 2016 8:41 PM UTC

Thanks Amit & Bsloki for your reply.

Translate