Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Template compilation and cache

How templates become PHP and which caches hold them: TemplateCompile, compiled templates in var/<site>/cache/template/compiled, DevelopmentMode for checking file times, the template, template-override and template-block…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/templates/template-compilation-and-cache.md

On this page

Template compilation and cache

This page is for designers who want to know why a template change sometimes shows at once and sometimes not.

Contents

  1. Compilation
  2. The template caches
  3. Development settings
  4. Precompiling

Compilation

With site.ini [TemplateSettings] TemplateCompile=enabled (default) each template is translated into PHP the first time it is used and stored under var/<site>/cache/template/compiled/; later requests run the PHP. TemplateOptimization (enabled) optimizes the generated code.

The template caches

Cache idHoldsClear after
templatecompiled templatestemplate changes when file times are not checked
template-overridethe override and template lookup tablesadding templates or override rules
template-blockthe stored output of cache-blockschanging parts inside cache-blocks
contentthe view cache (rendered full views)changing view templates
design_basethe list of design folders (with DesignLocationCache=enabled)activating a design extension

php bin/php/ezcache.php --clear-id=<id>; --list-ids prints them all. [TemplateSettings] TemplateCache=enabled controls cache-blocks (disabled: never used).

Development settings

[TemplateSettings] DevelopmentMode=enabled makes the template engine compare the times of compiled and source files, so edited templates are recompiled without a cache clear (the comment in settings/site.ini warns that it adds file access and is not for live sites). It also turns the packer to level 0 (The packer). Enable it on a development siteaccess only, and clear compiled templates when switching it.

Precompiling

./console exp:eztc compiles the templates of a siteaccess into the template cache in advance (--force recompiles all), so the first visitors after a deploy do not pay for compilation.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x