mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- optimization on cache update when main template is modified
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== 3.1.22-dev ===== (xx.xx.2015)
|
===== 3.1.22-dev ===== (xx.xx.2015)
|
||||||
|
05.05.2015
|
||||||
|
- optimization on cache update when main template is modified
|
||||||
|
|
||||||
05.05.2015
|
05.05.2015
|
||||||
- bugfix code could be messed up when {tags} are used in multiple attributes https://github.com/smarty-php/smarty/issues/23
|
- bugfix code could be messed up when {tags} are used in multiple attributes https://github.com/smarty-php/smarty/issues/23
|
||||||
|
|
||||||
|
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.22-dev/24';
|
const SMARTY_VERSION = '3.1.22-dev/25';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
@@ -138,6 +138,9 @@ class Smarty_Template_Cached
|
|||||||
} else {
|
} else {
|
||||||
$cached->valid = true;
|
$cached->valid = true;
|
||||||
}
|
}
|
||||||
|
if ($cached->valid && $_template->source->timestamp > $cached->timestamp) {
|
||||||
|
$cached->valid = false;
|
||||||
|
}
|
||||||
if ($cached->valid && $_template->caching == Smarty::CACHING_LIFETIME_CURRENT && $_template->cache_lifetime >= 0 && time() > ($cached->timestamp + $_template->cache_lifetime)) {
|
if ($cached->valid && $_template->caching == Smarty::CACHING_LIFETIME_CURRENT && $_template->cache_lifetime >= 0 && time() > ($cached->timestamp + $_template->cache_lifetime)) {
|
||||||
// lifetime expired
|
// lifetime expired
|
||||||
$cached->valid = false;
|
$cached->valid = false;
|
||||||
|
Reference in New Issue
Block a user