8000 [Cache] Set mtime of cache files 1 year into future if they do not ex… · symfony/cache@a992828 · GitHub
[go: up one dir, main page]

Skip to content

Commit a992828

Browse files
Blacksmoke16nicolas-grekas
authored andcommitted
[Cache] Set mtime of cache files 1 year into future if they do not expire
1 parent a21fdd1 commit a992828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Traits/FilesystemCommonTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private function write(string $file, string $data, int $expiresAt = null)
109109
fclose($h);
110110

111111
if (null !== $expiresAt) {
112-
touch($this->tmp, $expiresAt);
112+
touch($this->tmp, $expiresAt ?: time() + 31556952); // 1 year in seconds
113113
}
114114

115115
return rename($this->tmp, $file);
< 3299 /div>

0 commit comments

Comments
 (0)
0