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 don't need to change a single line in your controllers when you change your caching libraries. Just modify your config.yml
file and you will be good to go.
However, we all know that caching is not for the application layer and views only. Sometimes...