Caches in a Symfony project

In this book, we will focus on two types of caches: the gateway cache (which is called a reverse proxy cache as well) and the doctrine cache. As you may have guessed, the gateway cache deals with all of those HTTP cache headers mentioned in the previous topics. Symfony comes with a very strong gateway cache out of the box. All you need to do is activate it in your front controller, and then start defining your cache expiration and validation strategies in your controllers.

That said, it does not mean that you are forced to use the Symfony cache only. If you prefer other reverse proxy cache libraries (that is, Varnish or Django), you are welcome to use them. The caching configurations in Symfony are transparent so you ...

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.