if ((!isDebugTemplateCacheEnabled()) && (isTemplateCached('html', $template))) {
// Evaluate the cache
$templateContent = readTemplateCache('html', $template, $content);
+
+ // Better remove array element which is only needed in uncached mode
+ unset($GLOBALS['template_eval']['html'][$template]);
} elseif (!isset($GLOBALS['template_eval']['html'][$template])) {
// Make all template names lowercase
$template = strtolower($template);
if ((!isDebugTemplateCacheEnabled()) && (isTemplateCached('email', $template))) {
// Evaluate the cache
$templateContent = readTemplateCache('email', $template, $content);
+
+ // Better remove array element which is need only in uncached mode
+ unset($GLOBALS['template_eval']['email'][$template]);
} elseif (!isset($GLOBALS['template_eval']['email'][$template])) {
// Base directory
$basePath = sprintf("%stemplates/%s/emails/", getPath(), getLanguage());