Key players in the HTTP cache header

Before diving into the Symfony application cache, let's familiarize ourselves with the elements that we need to handle in our cache strategies. To do so, open www.wikipedia.org in your browser, inspect any resource with 304 response code, and ponder on request/response headers in the Network tab:

Key players in the HTTP cache header

Among the response elements, there are four cache headers that we are interested in the most, Expires and Cache-Control, which will be used for the expiration model, and Etag and Last-Modified, which will be used for the validation model.

Apart from these cache headers, we can have variations of the same cache (compressed/uncompressed) ...

Get Mastering Symfony now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.