Hi Experts,
We have two ways of registering a sling servlet
- Registering through path
- Registering through resource type.
Say we use the second option, I have a page component /sampleproject/page/homepagecomponent and i register a servlet using this component. This means whenever i access a page created using this component(/content/home.html) the servlet will get invoked and the response from the servlet will be used to render the page. It does not matter whether the call is from the browser or it is an Ajax call.
If my above understanding is correct can we cache the response from the servlet in dispatcher through this option? Usually say we use something like /bin/myservlet as path for servlet, in disptacher we will allow this path to hit the publish instance and we will not cache it. I am trying to cache the response from the servlet as well. Please help me with your inputs.
Thanks,
Jai.