Home


11.3 Excluding self-executing fragments from the cache

What: A fragment is sometimes truly uncacheable, but that does not make the complete request uncacheable. Use the do-not-cache property to exclude truly uncacheable fragments from servlet caching the full page.

How: To use do-not-cache successfully, the fragment must still be self-executing. With some reworking, nearly every fragment can be made self-executing. Tell the WebSphere cache to ignore a fragment in a servlet by having the fragment's JSP defined in the cachespec.xml with the do-not-cache property. See 2.7.5, DynaCache fragment caching for more information on do-not-cache.

Why: The technique of not caching a fragment should be used very rarely and only when it cannot be avoided. Very few things are not cacheable and weigh the value of not caching versus the possible changes needed to make it cacheable.

+

Search Tips   |   Advanced Search