It's no secret that I'm a fan of the Twig templating system. I like the syntax and flexibility far more than Smarty, PHP Templates, and other solutions I've worked with. I also like that it has minimal outside dependencies, so I can quickly add it to any project.
One of Twig's more interesting features is that it converts template files to PHP classes. This can really save processing power, because it only has to happen once and future references to that template can just invoke the saved PHP class.
However, if you forget to enable Twig caching, the compiled PHP classes are discarded after each page load - this burns a ton of resources and slows down your site.
Enabling Twig caching only requires a few magical incantations, and as luck would have it, I'm happy to demonstrate two common scenarios.