InfoCenter Home >
4: Developing applications >
4.5: Dynamic fragment cache >
4.5.0: Getting started with Dynamic fragment cache
4.5.0: Getting started with Dynamic fragment cache
This article provides you with a quick list of tasks that you must complete
to enable dynamic fragment caching with XML. Click any of the links for more information
on a specific topic.
- Create a global configuration file
In the <product_installation>/properties directory,
locate the dynacache.sample.xml file.
Copy the dynacache.sample.xml file to dynacache.xml.
The sample is a valid cache configuration file that will enable caching with
default values.
With caching enabled, the application server will look for a servlet configuration
file in the /properties directory that declares which servlets should be cached.
The options selected are discussed in detail in article,
Global configuration.
- Create a servlet configuration file
In the <product_installation>/properties directory,
locate the servletcache.sample.xml file.
Copy the servletcache.sample.xml to servletcache.xml.
This sample file configures WebSphere's default server's snoop servlet for caching.
Article Policy configuration describes the
different ways for definining how to cache individual servlets or JSP files.
- Reinitialize the Application Server
Stop and restart the WebSphere Application Server.
- Verify the cacheable page.
Using a Web Browser, access URI: /servlet/snoop to view the snoop servlet in the default application.
Invoking and reloading the URI several times should return the same output for the snoop servlet.
The snoop servlet is now operating incorrectly, since it displays the request information from its
first invocation rather than from the current request. You can inspect the entry in the cache with the
Servlet cache monitor
|
|