Web Caching

An approach to optimizing data storage in web applications.

In the previous lesson, we discussed the latency that frequent database calls introduce in web applications. Now, we will look into web caching as a means of eliminating this latency.

Introduction to web caching #

Web caching is a design feature of the HTTP protocol that is meant to minimize the amount of traffic an application is handling at any given point in order to improve the responsiveness of the web application, as perceived by users, as a whole. In order to do this, caches are used at each level starting from the server itself all the way to users’ browsers, and each of them is meant to store data that users are very likely to request.

Essentially, web caching works by caching HTTP responses for certain requests according to a probabilistic analysis of requests that are frequently observed on the server. Subsequent requests for cached content can then be fulfilled from a cache closer to the user instead of having to send the request all the way back to the web server, which then makes a call to the database for the required data.

Get hands-on with 1200+ tech skills courses.