Introduction to the HTTP caching system

Caching is an essential part of web service development. The primary purpose of web service caching is to improve the performance of our system and reduce the overload of the webserver. Furthermore, fetching something over the network is slow and expensive, and so it is necessary to implement a caching system to improve the responsiveness of our web service and to avoid unnecessary additional computation. In this section, we will focus on some of the features that are defined in the HTTP 1.1 caching specification.

These caching specifications are sent by the webserver to the client. Whoever has ownership of the client needs to read the caching specifications and respond appropriately. In general, there are two common use cases for caching responses: the first one is when a web service exposes very dynamic content. In this case, the data changes a lot, and the caching time can be reduced or avoided at all. The second case is when our service may serve some static content. In that case, we can set a high caching time for the content that doesn't change a lot.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.1.136