mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-29 02:03:31 +02:00
- optimize invalidation of internal caches
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user