mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 12:14:12 +02:00
- optimization on cache update when main template is modified
This commit is contained in:
@@ -138,6 +138,9 @@ class Smarty_Template_Cached
|
||||
} else {
|
||||
$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)) {
|
||||
// lifetime expired
|
||||
$cached->valid = false;
|
||||
|
||||
Reference in New Issue
Block a user