From 051b7bd44b52db04b4b5e54db99436b834a35c21 Mon Sep 17 00:00:00 2001 From: Josh Di Fabio Date: Thu, 23 Apr 2015 16:08:03 +0100 Subject: [PATCH] Touch access time only when reading from cache --- src/Composer/Cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Cache.php b/src/Composer/Cache.php index 4fae9be33..dfecef010 100644 --- a/src/Composer/Cache.php +++ b/src/Composer/Cache.php @@ -136,7 +136,7 @@ class Cache { $file = preg_replace('{[^'.$this->whitelist.']}i', '-', $file); if ($this->enabled && file_exists($this->root . $file)) { - touch($this->root . $file); + touch($this->root . $file, filemtime($this->root . $file), time()); if ($this->io->isDebug()) { $this->io->writeError('Reading '.$this->root . $file.' from cache');