The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 5ea46231 authored by David Maus's avatar David Maus Committed by Demian Katz
Browse files

Use absolute filename for key generation

parent 790a6c32
No related merge requests found
...@@ -81,8 +81,9 @@ class CacheDecorator implements ReaderInterface ...@@ -81,8 +81,9 @@ class CacheDecorator implements ReaderInterface
*/ */
public function fromFile ($filename) public function fromFile ($filename)
{ {
$mtime = @filemtime(realpath($filename)); $absFilename = realpath($filename);
$key = $this->generateKey($mtime . $filename); $mtime = @filemtime($absFilename);
$key = $this->generateKey($mtime . $absFilename);
if ($this->storage->hasItem($key)) { if ($this->storage->hasItem($key)) {
return $this->storage->getItem($key); return $this->storage->getItem($key);
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment