Template cache and template compile explained¶
HPPG features template compilation. Most template engines are based on some custom developer template syntax, but PHP itself is good template engine properly used and future more than any template engine can offer. So what is cached if template engine uses PHP.
Current template engine cached some used functions in templates. Some examples of compiled templates blocks.
Internal templates inclusion:¶
<?php include_once(erLhcoreClassDesign::designtpl('pagelayouts/parts/leftmenu_admin.tpl.php'));?>
These template blocks are replaced with included templates content. System generated one template file without inclusions witch reduces systems disk calls.
URL compilation:¶
<?=erLhcoreClassDesign::baseurl('/')?>
These templates blocks are replaced with precompiled URL and avoids repeatable php function calls.
Settings compilation:¶
<?=erConfigClassLhConfig::getInstance()->conf->getSetting( 'site', 'title' )?>
These templates blocks are replaced with precompiled settings values.
Translations compilations¶
<?=erTranslationClassLhTranslation::getInstance()->getTranslation('user/grouplist','Title');?>
These blocks are replaced with compiled options.
Cleaning template cache¶
Template cache can be cleaned by logging to administration and pressing clean cache link.