mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 19:54:14 +02:00
- bugfix/improvement in 3.1.22-dev cache locking did not work as expected
This commit is contained in:
@@ -61,7 +61,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
|
||||
$cached->lock_id = $_lock_dir . sha1($_cache_id . $_compile_id . $_template->source->uid) . '.lock';
|
||||
}
|
||||
$cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
|
||||
$cached->exists = is_file($cached->filepath);
|
||||
$cached->timestamp = $cached->exists = is_file($cached->filepath);
|
||||
if ($cached->exists) {
|
||||
$cached->timestamp = filemtime($cached->filepath);
|
||||
}
|
||||
@@ -113,7 +113,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
|
||||
$obj = new Smarty_Internal_Write_File();
|
||||
if ($obj->writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
|
||||
$cached = $_template->cached;
|
||||
$cached->timestamp = $cached->exists = is_file( $cached->filepath);
|
||||
$cached->timestamp = $cached->exists = is_file($cached->filepath);
|
||||
if ($cached->exists) {
|
||||
$cached->timestamp = filemtime($cached->filepath);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user