- optimize invalidation of internal caches

This commit is contained in:
uwetews
2015-08-23 05:27:16 +02:00
parent 1ae11c26c0
commit 189b2af115
7 changed files with 45 additions and 32 deletions
+6 -5
View File
@@ -216,12 +216,13 @@ abstract class Smarty_CacheResource
*
* @param Smarty $smarty Smarty object
*/
public static function invalidLoadedCache(Smarty $smarty)
public function invalidLoadedCache(Smarty $smarty)
{
foreach ($smarty->_cache['template_objects'] as $tpl) {
if (isset($tpl->cached)) {
$tpl->cached->valid = false;
$tpl->cached->processed = false;
if (isset($smarty->_cache['template_objects'])) {
foreach ($smarty->_cache['template_objects'] as $key => $tpl) {
if (isset($tpl->cached)) {
unset ($smarty->_cache['template_objects'][$key]);
}
}
}
}