Fragment caching

Most dynamic Web pages consist of multiple smaller and simpler page fragments. Some fragments are static (such as headers and footers), while others are dynamic (such as fragments containing stock quotes or sport scores). Breaking a page into fragments or components makes effective caching possible for any page, even a highly dynamic page.

These are the main goals of fragment caching: Achieve benefits of caching for personalized pages. Reduce cache storage requirements, by sharing common fragments among multiple pages which helps maximize fragment reusability. Move cache into the network to multiply above benefits.

Figure 14-2 Page fragments

Figure 14-2 shows that when a page is broken down into fragments based on reusability and cacheability, some or all of the fragments (for example, headers, footers, and navigation bars for all users; market summary for user groups) may become reusable and cacheable for a larger audience. Only fragments that are not cacheable need to be fetched from the back-end, thereby reducing server-side workload and improving performance. Even a very short time of caching can improve performance, for example if you can cache the Market Summary information just for 10 seconds, it can make a big difference during peak hours.

Web pages should be fragmented to cache dynamic content effectively within the enterprise infrastructure and at the content distribution network. However, in some cases, even caching the most granular, final formatted fragment is not sufficient. Under such circumstances, caching at the raw data level is the next granular technique that can be used (see 14.3.2, Command result caching).

Web page design also plays an important role in determining where dynamic data is cached. One example is personalized pages. Although personalized, these pages contain user specific, nonuser-specific, locale sensitive, secure, non security sensitive dynamic data. To maximize the benefit of caching dynamic content, these types of pages should be fragmented as finely as possible. They can be cached independently at different locations. For example, the nonuser-specific, non security sensitive fragments or components are generally useful to many users, and thus can be cached in a more public space and closer to the users. The security sensitive data should be cached behind the enterprise firewall, yet as close to the edge of the enterprise as possible.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.