Hello Community - I have a page with dynamic content. Based on the results from the below URLs(with query string), the content is getting displayed on the page (www.test.com/products.html) and it is working fine in author, publish and dispatcher.
If I directly access the page (CDN), the URL with query parameter is getting cached, i.e., I see the same content for all four sections of the page. We need to restrict the URLs with the query parameters to be cached, the results should display different results as the query parameters are different and it should not be cached.
Just putting out an after thought though 🙂 - If this is an external facing page and with considerably high number of products, the query parameters could be passed as post data form parameters via ajax call and allow caching of the calls and clear the cache using TTL in Dispatcher and CDN (or custom implementation to clear it) in case of any performance concerns
Check if ignore query string is enabled at CDN caching level, this might be the reason these JSON response are not getting cached when its accessed using dispatcher url & getting cached when its accessed using CDN website url. another option is, you can set below mentioned response header in backend servlet so that this response will not cached.