Skip to content

Commit

Permalink
If attempting to set a new cache item that has already expired, delet…
Browse files Browse the repository at this point in the history
…e it.
  • Loading branch information
Jordan Hall committed Jan 11, 2018
1 parent 64c5110 commit 9fae0e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/RWFileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function set($key, $content, $expiry = 0)

// Do not save if cache has already expired
if ($cacheObj->expiryTimestamp < time()) {
$this->delete($key);
return false;
}

Expand Down

0 comments on commit 9fae0e6

Please sign in to comment.