diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_template_cached.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_template_cached.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_template_cached.php b/vendor/smarty/smarty/libs/sysplugins/smarty_template_cached.php index 58f0daf28..45c83c895 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_template_cached.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_template_cached.php @@ -83,6 +83,8 @@ class Smarty_Template_Cached extends Smarty_Template_Resource_Base * create Cached Object container * * @param Smarty_Internal_Template $_template template object + * + * @throws \SmartyException */ public function __construct(Smarty_Internal_Template $_template) { @@ -105,8 +107,7 @@ class Smarty_Template_Cached extends Smarty_Template_Resource_Base $_template->cached = new Smarty_Template_Cached($_template); $_template->cached->handler->populate($_template->cached, $_template); // caching enabled ? - if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || - $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || $_template->source->handler->recompiled + if (!$_template->caching || $_template->source->handler->recompiled ) { $_template->cached->valid = false; } @@ -162,13 +163,13 @@ class Smarty_Template_Cached extends Smarty_Template_Resource_Base } else { $this->valid = true; } - if ($this->valid && $_template->caching == Smarty::CACHING_LIFETIME_CURRENT && + if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_CURRENT && $_template->cache_lifetime >= 0 && time() > ($this->timestamp + $_template->cache_lifetime) ) { // lifetime expired $this->valid = false; } - if ($this->valid && $_template->smarty->compile_check == 1 && + if ($this->valid && $_template->compile_check === Smarty::COMPILECHECK_ON && $_template->source->getTimeStamp() > $this->timestamp ) { $this->valid = false; |