Overview of the dynamic cache service

WAS consolidates several caching activities, including servlets, JavaServer Pages (JSPs), Web services, and WAS commands into one service called the dynamic cache service. These caching activities can work together to improve application performance and share many configuration parameters, which are set in an application server's dynamic cache service.

The dynamic cache service works within an application server Java virtual machine (JVM) and intercepts calls to cacheable objects. For example, it intercepts calls through a servlet service() method or a command execute() method. It then stores the output of the object to (or serves the content of the object from) the dynamic cache.

Use the dynamic cache service to improve the performance of servlet and JSP files by serving requests from an in-memory cache. Cache entries contain servlet output, results of servlet execution, and metadata.

For example, a Web site that sells toys can use dynamic caching to cache the servlet that looks up information on a popular toy. It is unlikely that the information displayed about the toy changes often, which makes data that is ten or more minutes old acceptable. When WAS receives the request, it immediately returns the cached output instead of actually executing the servlet or JSP code. This results in a faster response for the user, less servlet processing, and less overhead consumed by queries to the database. However, it is important that you use dynamic caching only when appropriate, because caching servlets that are rarely used may consume more resources than it saves.