Skip to content

Commit

Permalink
Merge pull request #21 from viktorasp/master
Browse files Browse the repository at this point in the history
Validate cache expiration based on 'last changed' date.
  • Loading branch information
Gregwar committed Jun 14, 2015
2 parents 9602846 + 7452d38 commit 57eb9a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ protected function checkConditions($cacheFile, array $conditions = array())
case 'youngerthan':
// Return false if the file is older than the file $value, or the files $value
$check = function($filename) use ($cacheFile) {
return !file_exists($filename) || filectime($cacheFile) < filectime($filename);
return !file_exists($filename) || filemtime($cacheFile) < filemtime($filename);
};

if (!is_array($value)) {
Expand Down

0 comments on commit 57eb9a8

Please sign in to comment.