From dc92f60367ddd192c6c2c096325d5bb067cbf6db Mon Sep 17 00:00:00 2001 From: David Maus <maus@hab.de> Date: Wed, 5 Dec 2012 15:13:30 +0100 Subject: [PATCH] Factor in file modification time in hash key generation * VuFind/Config/Reader/CacheDecorator.php (fromFile): Factor in file modification time in hash key generation. --- module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php b/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php index 0e487e65628..da9ceffc4ef 100644 --- a/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php +++ b/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php @@ -81,7 +81,8 @@ class CacheDecorator implements ReaderInterface */ public function fromFile ($filename) { - $key = $this->generateKey($filename); + $mtime = @filemtime(realpath($filename)); + $key = $this->generateKey($mtime . $filename); if ($this->storage->hasItem($key)) { return $this->storage->getItem($key); } -- GitLab