How to let the dispatcher not cache certain component?

Avatar

Avatar

Rui_J

Avatar

Rui_J

Rui_J

15-10-2015

Hi

  I have a componenet that has some dynamic content. And I don't want to dispatcher to cache this part.  So inspired by http://www.slideshare.net/netceteragroup/dynamic-components-using-singlepageapplication-concepts-in-... (Page 4), This is what I did, under apps/myapp/dynamicComponent, I have a two files, one is dynamicComponent.jsp and the other is dynamicComponent.dynamic.jsp, So in dynamicComponent.dynamic.jsp page, I have some JSP code to render the dynamic content. and in dynamicComponenet.jsp, I am using SSI to include this like this

<div color="red">render this</div> <!--# include virtual="<%=currentNode.getPath().replace("jcr:content","_jcr_content")%>.dynamic.html" />

So I decide to directly hit the page component link like this http://localhost:4505/content/myapp/mypage/_jcr_content/rightPar/dynamicComponent.dynamic.html page, and it didn't show me this red "render this" text, so apparently, it didn't render me anything.

Can someone tell me what is wrong?

View Entire Topic

Avatar

Avatar

Bruce_Lefebvre

Employee

Avatar

Bruce_Lefebvre

Employee

Bruce_Lefebvre
Employee

15-10-2015

SSI includes are a feature of the web server, so you will need a dispatcher in front of your instance in order to use them (see answer at [0]). 

[0] also contains a suggestion to query WCMMode from within your JSP and use a <cq:include to make your content available in author mode, with no dispatcher present.

[0] https://forums.adobe.com/thread/1227938