Home | 2.7.4 DynaCache full page caching | 2.7.5 DynaCache fragment caching


Consume-subfragments

In DynaCache, full page caching is enabled by setting the <cache-entry> property consume-subfragments to true for the main targeted parent servlet or JSP, for example...

<property name="consume-subfragments">true</property>

When set to true, the consume-subfragments property tells DynaCache to cache the targeted JSP and any of its children's JSPs as a single page.

When a servlet is cached, only the content of that servlet is stored, with placeholders for any other fragments it includes or to which it forwards. Consume-subfragments(CSF) tells the cache to continue saving content when the parent servlet includes a child servlet.

The parent entry (the one marked CSF) will include all the content from all fragments in its cache entry (in the cache monitor we will see the include statements being consumed), resulting in one large cache entry that has no includes or forwards, but rather the content from the whole tree of entries. This saves a significant amount of application server processing, but is typically only useful when the external HTTP request contains all the information needed to determine the entire tree of included fragments.

+

Search Tips   |   Advanced Search