ESI for selective caching

Here is the definition of ESI according to Wikipedia:

 

"Edge Side Includes or ESI is a small markup language for edge level dynamic web content assembly. The purpose of ESI is to tackle the problem of web infrastructure scaling. Dynamic content creates a problem for caching systems. To overcome this problem a group of companies developed the ESI specification and submitted it to the W3C for approval."

 
 --Wikipedia

In simple words, we can use ESI to define independent caching rules for any section of each page. Again, Symfony comes with out-of-the-box support for the ESI feature. We don't need to install anything to use ESI in our project. All we need to do is uncomment the following line in config.yml:

# app/config/config.yml ...

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.