- improvement add internal $joined_template_dir property instead computing it on the fly several times

This commit is contained in:
uwe.tews@googlemail.com
2011-10-03 19:02:44 +00:00
parent c24e213ed9
commit 12e8593760
7 changed files with 25 additions and 16 deletions
@@ -154,10 +154,10 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
if ($tpl->source->exists) {
$_resourcename_parts = basename(str_replace('^', '/', $tpl->cached->filepath));
// remove from template cache
unset($smarty->template_objects[sha1(join(DIRECTORY_SEPARATOR, $smarty->getTemplateDir()).$tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
unset($smarty->template_objects[sha1($smarty->joined_template_dir.$tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
} else {
// remove from template cache
unset($smarty->template_objects[sha1(join(DIRECTORY_SEPARATOR, $smarty->getTemplateDir()).$tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
unset($smarty->template_objects[sha1($smarty->joined_template_dir.$tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
return 0;
}
}