Referer Request-Header Field Cookie Management for Template Pages and Fragments

Caching Dynamic Content with ESI Language Tags 11-19 Figure 11–2 Portal Site Page This page is assembled by Oracle Web Cache. A template page configured with ESI markup tags for a personalized greeting, weather, stocks, promotional advertisement, news, and sports fragments is assembled based on Marks preferences. For example, because Mark chose San Francisco weather, the application looks up San Francisco weather information and puts it into the final full HTML page output. Because of its dynamic content, this page would not be cacheable. On the other hand, with ESI markup tags, Oracle Web Cache assembles and caches most of the content. The following sections describe how the template page and its fragments are implemented using esi:inline and esi:include tags: ■ Section 11.2.3.1.1, Portal Example Using inline Tags ■ Section 11.2.3.1.2, Portal Example Using Include Tags

11.2.3.1.1 Portal Example Using inline Tags

This section describes how esi:inline tag fragmentation and assembly can drastically increase the value of dynamic content caching for pages that do not contain real-time elements. It shows how to apply the esi:inline tag for an existing application that supports non-fetchable fragments. The esi:inline tag helps reduce space consumption and improves cache hit ratios by isolating the dynamic content. Note: If an application supports independently fetchable fragments, it is possible to use the esi:inline for fetchable fragments by setting the fetchable attribute to yes. See Section 11.4.5 for further information about the fetchable attribute. 11-20 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache To use the esi:inline tag, the logical fragments in portal.esi are marked with the esi:inline tags. The personalized greeting, Weather Forecast, My Stocks, Promotion campaign, Latest News, and Latest Sports News naturally become fragments because they have individual caching properties and can be shared. The My Stock fragment is further broken down into five sub-fragments, one for each stock quote. In addition, to achieve the maximum fragment sharing, the common HTML code sections between each two personalized fragments are also enclosed as ESI fragments and are given constant names, so that the varying template contains as little common data as possible. Example 11–6 shows portal.esi with esi:inline tags. Example 11–6 portal.esi with inline Tags esi:inline name=Common_Fragment_1 -- First common fragment -- HTML ... -- Personalized Greeting With ESI variable -- Welcome, QUERY_STRING{username} esi:inline esi:inline name=Weathers_San_Francisco ... -- Personalized Weather Forecast -- Weather Forecast for San Francisco TABLE TR TD Currently: 50F TD TR TABLE esi:inline esi:inline name=Common_Fragment_2 -- Second common fragment -- ... esi:inline esi:inline name=Stocks_QUERY_STRING{username} -- Personalized Stock Quote Selections -- TABLE TR TD esi:inline name=ticker_IBM IBM 84.99 esi:inline BR esi:inline name=ticker_ORCL ORCL 13.379 esi:inline BR esi:inline name=ticker_YHOO YHOO 27.15 esi:inline TD TR TABLE esi:inline