I am trying to improve our bloomreach server performance on the cloud, and am trying to turn on the page cache. I have been reading and trying all different configurations, but it seems that cacheable is not working as intended. I turn on diagnostic on the hosts level (hst:diagnosticsenabled = true, hst:diagnosticsdepth = 4, hst:diagnosticsthresholdmillisec = 1). I make resourceapi request directly from my chrome browser, and each time i can see from the diagnostic log, the request goes to PageCachingValve and then continues on to PageModelAggregationValve, which will call each component of the page. This happens all the time. I thought if I turn on the cacheable on the host level, and don’t turn it off for all components of the page, the page will be cached. I did try to turn on cacheable on all different level, but nothing seems to work.
Thanks for reply. Yes, I did read the page, and i just checked that it doesn’t have any headers or cookies. I even check network requests on the Chrome borwser to make sure none of that is being passed in request or response.
What I do to test if the page is cached or not is by using the “resourceapi” call. Our app is a React SPA application. So we call resourceapi, which just return JSON, and react will render the page. So even the resourceapi is not being cached.
Does anyone know where to check the pageCache.maxSize and pageCache.timeToLiveSeconds for the page cache? Is it supposed to be in web.xml?
We have a rest api under the site, ie www.qwerty.com/rest/request. So for everything under /rest, it’s not cached (cacheable is false). But all the other pages are under other paths, ie www.qwerty.com/retailers, doen’t have any cacheable settings.
Can you shed some light on how to debug PageCachingValve? I can’t even get the source code.
I would start with a breakpoint as shown below - assuming the config is OK, and debugging is working, I would expect it to stop on line 61 when you hit the resourceapi. Then step through the code.
Your IDE should be able to download those automatically…in case you are using an IDE which is not able to download sources, you can get them from maven repository by using dependency plugin: