Home


11.2 Caching personalized fragments

What: Some of the pages you cached at the servlet level will have content that needs to vary page to page depending on many different factors. With these pages, exclude the fragments containing varying content from the servlet's cache using the do-not-consume property, and cache the variable fragments using JSP caching (fragment caching) separately.

How: A cachespec.xml entry must be made for each fragment you wish to cache separately. The fragment being excluded must be self-executing. Not all fragments in WebSphere Commerce are self-executing. To test if the fragment is self-executing, pass the fragment's URL to a Web browser, including the necessary parameters. See 2.7.5, DynaCache fragment caching for more information on fragment caching.

Why: The page, and its personalized page fragments, are stored in separate cache entries. When the page is transmitted again, the pieces are assembled from the fragments in the cache. Keep in mind that the more pieces there are to assemble into a page, the longer it will take to retrieve entries from the cache. In general, combining servlet caching with fragment caching results in near full page caching performance for pages with personalized content.

+

Search Tips   |   Advanced Search