|
VIEW CACHING
The view cache setting is enabled by default in the production environment and pre- vents subsequent render() calls from performing disk I/O. The contents of the tem- plates are saved in memory, greatly improving performance. The side effect of enabling this setting is that you can no longer edit the template files without restarting the server, which is why it’s disabled in development. If you’re running a staging envi- ronment, you’ll likely want to enable this option.
As illustrated in figure 8.12, when view cache is disabled, the template is read from disk on every request. This is what allows you to make changes to a template without restarting the application. When view cache is enabled, the disk is only hit once per template. |
|