Skip to content

Commit

Permalink
Update src/Cache/FileHandler.php
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Oct 28, 2023
1 parent 860c4c0 commit c9ee48a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cache/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function write(CacheInterface $cache): void
fwrite($handle, $cache->toJson());
fflush($handle);
fsync($handle);
$this->fileMTime = $this->getFileCurrentMTime();
$this->fileMTime = time(); // we could take the fresh `mtime` of file that we just modified with `$this->getFileCurrentMTime()`, but `time()` should be good enough here and reduce IO operation
fclose($handle);
}

Expand Down

0 comments on commit c9ee48a

Please sign in to comment.