# # # patch "downloads.php" # from [c9b7fe46150ba619f74164e65a6092a141151142] # to [4dc944e1e42a212dc3e4068fde88ed765189a5cf] # ============================================================ --- downloads.php c9b7fe46150ba619f74164e65a6092a141151142 +++ downloads.php 4dc944e1e42a212dc3e4068fde88ed765189a5cf @@ -78,6 +78,7 @@ class cache class cache { + private static $lifetime = 86400; private static $instance; private $basedir; private $cachedir; @@ -99,11 +100,14 @@ class cache } public function get($file) { - if (!isset($this->cache[$file])) + if (!isset($this->cache[$file]) || + !isset($this->cache[$file][2]) || + $this->cache[$file][2] + self::$lifetime < time()) { $this->cache[$file] = array( filesize("{$this->basedir}/$file"), - sha1_file("{$this->basedir}/$file") + sha1_file("{$this->basedir}/$file"), + time() ); } return $this->cache[$file];