Home


10.2.2 Inability to cache page fragments

Initial attempts at configuring cachespec.xml were unsuccessful. Caching fragments caused the application to fail in unexpected ways. For fragment caching to be successful, the fragments must be independent. The design of the application was that the page fragments were dependant on the parent page for information. For example, the page header displayed a user name which was derived from page headers and the navigation menus were customized based on the identified user profile.

Once full page caching (com.ibm.commerce.server.RequestServlet.class) was enabled, performance improvements were realized.

Having enabled full page caching, some fragments (such as the mini-shopping cart) had to be un-cached. The version of WebSphere Application Server being used did not support the "do not cache" option on consumed fragments. Consequently, these fragments needed to be invalidated using a short timeout (1 second). This workaround is scheduled to be eliminated in the next version of the online shop using a later release of WebSphere Commerce.

To set up caching to work with WebSphere Commerce we needed to determine the parameters being passed to WebSphere Commerce. We set all parameters passed to WebSphere Commerce in NonEncryptedParameters and analyzed the logs of all Web traffic generated during testing, determining the parameters from the URL request lines. We also enabled DoubleClickMonitoredCommands and excluded the full page JSPs being cached. Both of these segments are modified within the <instance>.xml file.

Full page caching provided significant enough gains in performance to allow the online shop to be implemented in production. Statistics gained from the test runs now indicated the slowest pages were 10 seconds at the 95 percentile (that is, 5% of the pages taking over 10 seconds). Previously, the same pages were over 90 seconds at the 95 percentile. Although this was over a 900% gain in performance, it was only just inside the acceptable range and further improvements would need to be made in the near future.

+

Search Tips   |   Advanced Search