Skip to content

Commit bd6a129

Browse files
Merge pull request #26 from dudilag/master
Removed cache system from the Composer Downloader
2 parents 3a3de79 + 78fc676 commit bd6a129

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/Netresearch/Composer/Patches/Downloader/Composer.php

+2-15
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ class Composer implements DownloaderInterface {
2424
*/
2525
protected $remoteFileSystem;
2626

27-
/**
28-
* Very simple cache system
29-
* @var array
30-
*/
31-
protected $cache = array();
32-
3327
/**
3428
* Construct the RFS
3529
*
@@ -56,10 +50,7 @@ protected function getOriginUrl($url) {
5650
* @return string Contents of the URL
5751
*/
5852
public function getContents($url) {
59-
if (array_key_exists($url, $this->cache)) {
60-
return $this->cache[$url];
61-
}
62-
return $this->cache[$url] = $this->remoteFileSystem->getContents($this->getOriginUrl($url), $url, false);
53+
return $this->remoteFileSystem->getContents($this->getOriginUrl($url), $url, false);
6354
}
6455

6556
/**
@@ -69,12 +60,8 @@ public function getContents($url) {
6960
* @return stdClass
7061
*/
7162
public function getJson($url) {
72-
$key = 'json://' . $url;
73-
if (array_key_exists($key, $this->cache)) {
74-
return $this->cache[$key];
75-
}
7663
$json = new \Composer\Json\JsonFile($url, $this->remoteFileSystem);
77-
return $this->cache[$key] = $json->read();
64+
return $json->read();
7865
}
7966
}
8067
?>

0 commit comments

Comments
 (0)