Software architects should take advantage of caching in order to improve performance and scalability. Caching involves copying data that may be needed again to fast storage so that it can be accessed quicker in subsequent uses. We will discuss HTTP caching and the use of content delivery networks in the Improving web application performance section later in this chapter. In this section, we will focus on server-side caching strategies.
Server-side caches can be used to avoid making expensive data retrievals from the original data store (for example, a relational database) repeatedly. The server-side cache should be placed as close to the application as possible to minimize latency and improve response times.
The type of storage used for a server-side cache is designed to be fast, such as an in-memory database. The more data and users that an application has...