![]() Second, we will look at what happens when our cache receives a request for a resource it already knows. For this, we will examine each Cache-Control directive and clarify some of them that have been known to have conflicting meanings. This will allow us to understand how origin servers instruct our cache on what to do with the resource, such as if it is allowed to store it, and for how long. This way, we can introduce each concept progressively as we need it.Īt first, our empty cache will have no choice but to forward requests to the origin server. Serving the resource from the cache when a fresh copy is available, varying over multiple representations, making a conditional request. As it gradually receives incoming HTTP requests, our cache will start behaving accordingly. To answer this question, we decided to consider the case of an empty cache that starts progressively caching and serving resources. To put it in another way: how does HTTP caching actually work? ![]() In this second part, it is time to shift our focus to the mechanisms at our disposal. In the first part of this series, we argued that caching is the most effective way to increase performance, when measured by the page load time. ![]() On the contrary, when overlooked or completely ignored, it can lead to some very unwanted side effects caused by misbehaving proxy servers that, in the absence of clear caching instructions, decide to cache anyway and serve stale resources. When properly done, caching can increase the performance of your application by an order of magnitude. This series of articles deals with caching in the context of HTTP.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |