Chapter 15. Caching

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.