mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
remove obsolete code
This commit is contained in:
@@ -215,14 +215,6 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
|
|||||||
} else {
|
} else {
|
||||||
return 0;
|
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);
|
return $this->delete($cache_name, $cache_id, $compile_id, $exp_time);
|
||||||
|
@@ -164,14 +164,6 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
|
|||||||
if (!$this->purge()) {
|
if (!$this->purge()) {
|
||||||
$this->invalidate(null);
|
$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;
|
return - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,16 +189,6 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
|
|||||||
$this->sanitize($compile_id);
|
$this->sanitize($compile_id);
|
||||||
$this->delete(array($cid));
|
$this->delete(array($cid));
|
||||||
$this->invalidate($cid, $resource_name, $cache_id, $compile_id, $uid);
|
$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;
|
return - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user