From 1ebaac314cdc19add8a453e5ff0b06d087d920ef Mon Sep 17 00:00:00 2001 From: uwetews Date: Sun, 27 Dec 2015 05:37:50 +0100 Subject: [PATCH] remove obsolete code --- .../sysplugins/smarty_cacheresource_custom.php | 8 -------- .../smarty_cacheresource_keyvaluestore.php | 18 ------------------ 2 files changed, 26 deletions(-) diff --git a/libs/sysplugins/smarty_cacheresource_custom.php b/libs/sysplugins/smarty_cacheresource_custom.php index 2a26be83..fc02c4d7 100644 --- a/libs/sysplugins/smarty_cacheresource_custom.php +++ b/libs/sysplugins/smarty_cacheresource_custom.php @@ -215,14 +215,6 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource } else { return 0; } - // remove from template cache - if (isset($smarty->_cache['template_objects'])) { - foreach ($smarty->_cache['template_objects'] as $key => $_tpl) { - if (isset($_tpl->cached) && $_tpl->source->uid == $source->uid) { - unset($smarty->_cache['template_objects'][$key]); - } - } - } } return $this->delete($cache_name, $cache_id, $compile_id, $exp_time); diff --git a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php index c447f6f1..89f82fc3 100644 --- a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php +++ b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php @@ -164,14 +164,6 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource if (!$this->purge()) { $this->invalidate(null); } - // remove from template cache - if (isset($smarty->_cache['template_objects'])) { - foreach ($smarty->_cache['template_objects'] as $key => $tpl) { - if (isset($tpl->cached)) { - unset($smarty->_cache['template_objects'][$key]); - } - } - } return - 1; } @@ -197,16 +189,6 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource $this->sanitize($compile_id); $this->delete(array($cid)); $this->invalidate($cid, $resource_name, $cache_id, $compile_id, $uid); - // remove from template cache - if (isset($resource_name) && isset($smarty->_cache['template_objects'])) { - if (isset($smarty->_cache['template_objects'])) { - foreach ($smarty->_cache['template_objects'] as $key => $tpl) { - if ($tpl->source->uid == $uid && isset($tpl->cached)) { - unset($smarty->_cache['template_objects'][$key]); - } - } - } - } return - 1; }