- bugfix in $smarty->cache->clear() method. (do not cache template object)

This commit is contained in:
Uwe.Tews
2010-04-27 17:47:24 +00:00
parent d44ffe9132
commit 4e27b70ba5

View File

@@ -133,7 +133,9 @@ class Smarty_Internal_CacheResource_File {
if (isset($resource_name)) { if (isset($resource_name)) {
$_save_stat = $this->smarty->caching; $_save_stat = $this->smarty->caching;
$this->smarty->caching = true; $this->smarty->caching = true;
$tpl = $this->smarty->createTemplate($resource_name); $tpl = new $this->smarty->template_class($resource_name, $this->smarty);
// remove from template cache
unset($this->smarty->template_objects[crc32($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
$this->smarty->caching = $_save_stat; $this->smarty->caching = $_save_stat;
if ($tpl->isExisting()) { if ($tpl->isExisting()) {
$_resourcename_parts = basename(str_replace('^', '/', $tpl->getCachedFilepath())); $_resourcename_parts = basename(str_replace('^', '/', $tpl->getCachedFilepath()));