Skip to content

Commit

Permalink
Remove redundant check in FileEngine
Browse files Browse the repository at this point in the history
This check was added back when Cache::settings() existed and served to
invalidate cache data when duration settings change. This is no longer
the case, and this code actively thwarts PSR6 per-key TTL operation.

Fixes #12827
  • Loading branch information
markstory committed Dec 24, 2018
1 parent dc63c2f commit 1a179e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cache/Engine/FileEngine.php
Expand Up @@ -194,7 +194,7 @@ public function read($key)
$time = time();
$cachetime = (int)$this->_File->current();

if ($cachetime < $time || ($time + $this->_config['duration']) < $cachetime) {
if ($cachetime < $time) {
if ($this->_config['lock']) {
$this->_File->flock(LOCK_UN);
}
Expand Down

0 comments on commit 1a179e6

Please sign in to comment.