- bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133)

This commit is contained in:
uwe.tews@googlemail.com
2013-02-28 19:17:26 +00:00
parent 2140439352
commit bd8af7c5cb
2 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
===== trunk =====
28.01.2013
- bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133)
24.01.2013
- bugfix wrong tag type in smarty_internal_templatecompilerbase.php could cause wrong plugin search order (Forum Topic 24028)

View File

@@ -467,10 +467,15 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
}
}
if ($cache) {
// CACHING_LIFETIME_SAVED cache expiry has to be validated here since otherwise we'd define the unifunc
if ($this->caching === Smarty::CACHING_LIFETIME_SAVED &&
$this->properties['cache_lifetime'] >= 0 &&
(time() > ($this->cached->timestamp + $this->properties['cache_lifetime']))) {
$is_valid = false;
}
$this->cached->valid = $is_valid;
} else {
$this->mustCompile = !$is_valid;
}
$this->mustCompile = !$is_valid; }
// store data in reusable Smarty_Template_Compiled
if (!$cache) {
$this->compiled->_properties = $properties;