Servlet/JSP result caching

Servlet/JSP result caching intercepts calls to a servlet's service method, and checks whether the invocation can be served from cache. If the request cannot be served from cache, the servlet is invoked to generate the output that will be cached. The resulting cache entry contains the output and/or the side effects of the invocation, like calls to other servlets or JSP files. Figure 14-15 shows all steps if the output is not cached. If the output is cached, then steps 6, 7 and 8 are skipped.

Figure 14-15 Servlet/JSP result caching - infrastructure view

Figure 14-16 gives a closer granularity look on steps 4 and 5. You can see that consequent requests are served only by the Web container, without involving the EJB container (steps 5 to 9).

Figure 14-16 Server/JSP result caching - appserver view

Servlet/JSP result caching can be based on:
Request parameters and attributes
The URI used to invoke the servlet or JSP
Session information

Servlet/JSP result caching can be used to cache both whole pages or fragments. This concept is explained in Figure 14-17.

Figure 14-17 Servlet/JSP result caching - fragmentation

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.