Be Lazy; Cache Your Data

In the previous chapter, we saw how to parallelize the processing of our requests and reduce our response time using our processor more accurately.

However, the best way to be efficient and fast is, obviously, not doing anything. This is what caching tries to do, allowing you to use the memory to keep track of the already processed results and read them fast when needed later on.

In this chapter, we will go through the following topics:

  • What caching is, how it works, and when it is interesting
  • Which kind of cache to use: local versus remote caching
  • JCache – a standard API for Java EE

Get Java EE 8 High Performance 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.