Caching is the technique of storing an in-memory copy of some information that’s expensive to create. For example, you could cache the results of a complex query so that subsequent requests don’t need to access the database at all. Instead, they can grab the appropriate object directly from server memory—a much faster proposition. The real beauty of caching is that unlike many other performance-enhancing techniques, caching bolsters both performance and scalability. Performance is better because the time taken to retrieve the information is cut down dramatically. Scalability is improved because you work around bottlenecks such as database connections. As a result, the application can serve more simultaneous page requests with fewer database operations.
Unable to display preview. Download preview PDF.