Explorar o código

Touch access time only when reading from cache

Josh Di Fabio %!s(int64=10) %!d(string=hai) anos
pai
achega
051b7bd44b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Cache.php

+ 1 - 1
src/Composer/Cache.php

@@ -136,7 +136,7 @@ class Cache
     {
     {
         $file = preg_replace('{[^'.$this->whitelist.']}i', '-', $file);
         $file = preg_replace('{[^'.$this->whitelist.']}i', '-', $file);
         if ($this->enabled && file_exists($this->root . $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()) {
             if ($this->io->isDebug()) {
                 $this->io->writeError('Reading '.$this->root . $file.' from cache');
                 $this->io->writeError('Reading '.$this->root . $file.' from cache');