Chapter 15. Caching


You normally store data in a relational database. Connecting to the database, however, is one of the most resource-consumptive operations that you commonly perform in a web application. Therefore, if you can reduce the number of times your application needs to access the database, your application will generally be faster and more scalable. Many people avoid databases entirely by storing their data in text files or XML files, but this solution is not suitable for every application. In addition, if you have an existing database-based application, using XML will require a change to your data structure and eventually to your application ...

Get Java for the Web with Servlets, JSP, and EJB: A Developer’s Guide to J2EE Solutions now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.