O'Reilly logo

Java™ Performance and Scalability, Volume 1: Server-Side Programming Techniques by Dov Bulka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Caching

When you are faced with a performance hot spot, you have basically two options. You could delve into the nitty-gritty details of the computation or find a clever way to avoid the computation altogether. The latter option is the preferred way to go since avoiding a costly computation is likely to be much faster than optimizing it. Computational values tend to fall into three categories according to their expected lifetimes:

  • Static—. These values do not change at all during the life of the application. For example, a Web server returns its own name on every response header. The name of the server will not change for the duration of server execution.

  • Pure dynamic—. These values could change at any point in time and must be recomputed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required