Home
5.2.1 Characteristics of cacheable objects
Several types of objects, such as Java Server Pages (JSPs), servlets, and WebSphere Commerce commands are cached in DynaCache. Among these objects, identify those that have cacheable characteristics.
Good candidates for caching are usually:
Long lived and more static so that they are less likely to be invalidated
Reusable by many users and with little personalization or custom content
Highly reusable across many parts of your site, for example, reusable JSP fragments
Are large enough to have an impact on performance, for example, full-page caching
Self-executable even as fragments
Free of security-sensitive dynamic data Poorer candidates for caching are usually:
Locale-sensitive
Highly variable based on their request parameters
Highly dynamic, that is, they are invalidated frequently
Have security considerations that require finer grained access to the cache Consider carefully:
User-specific objects- these usually give a good return, but not as good as generic candidates Keep in mind that the greatest benefit from caching is achieved when objects are cached closer to the client and earlier in the processing cycle of the request. In the WebSphere Commerce architecture this means we should cache JSPs and servlets, and consider caching commands within our application server, as shown in Figure | -1. Caching a request from a client at a later stage of processing lowers the performance benefit since the earlier layers introduce additional processing time and latency. Cached commands are processed by the Web container. They improve performance by avoiding both EJB invocation and requests to the database server.
Figure 5-1 Benefit of caching