mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Correct recompiled check
This commit is contained in:
@@ -125,7 +125,7 @@ class Smarty_Template_Cached
|
|||||||
//
|
//
|
||||||
// check if cache is valid
|
// check if cache is valid
|
||||||
//
|
//
|
||||||
if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || $_template->source->handler->recompiled) {
|
if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || $_template->source->recompiled) {
|
||||||
$cached->handler->populate($cached, $_template);
|
$cached->handler->populate($cached, $_template);
|
||||||
|
|
||||||
return $cached;
|
return $cached;
|
||||||
@@ -222,7 +222,7 @@ class Smarty_Template_Cached
|
|||||||
*/
|
*/
|
||||||
public function write(Smarty_Internal_Template $_template, $content)
|
public function write(Smarty_Internal_Template $_template, $content)
|
||||||
{
|
{
|
||||||
if (!$_template->source->handler->recompiled) {
|
if (!$_template->source->recompiled) {
|
||||||
if ($this->handler->writeCachedContent($_template, $content)) {
|
if ($this->handler->writeCachedContent($_template, $content)) {
|
||||||
$this->content = null;
|
$this->content = null;
|
||||||
$this->timestamp = time();
|
$this->timestamp = time();
|
||||||
@@ -248,7 +248,7 @@ class Smarty_Template_Cached
|
|||||||
*/
|
*/
|
||||||
public function read(Smarty_Internal_Template $_template)
|
public function read(Smarty_Internal_Template $_template)
|
||||||
{
|
{
|
||||||
if (!$_template->source->handler->recompiled) {
|
if (!$_template->source->recompiled) {
|
||||||
return $this->handler->readCachedContent($_template);
|
return $this->handler->readCachedContent($_template);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user