|
|
@ -115,19 +115,29 @@ class SvnDriver extends VcsDriver
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
protected function shouldCache($identifier)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return $this->cache && preg_match('{@\d+$}', $identifier);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function getComposerInformation($identifier)
|
|
|
|
public function getComposerInformation($identifier)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!isset($this->infoCache[$identifier])) {
|
|
|
|
if (!isset($this->infoCache[$identifier])) {
|
|
|
|
if ($res = $this->cache->read($identifier.'.json')) {
|
|
|
|
if ($this->shouldCache($identifier) && $res = $this->cache->read($identifier.'.json')) {
|
|
|
|
return $this->infoCache[$identifier] = JsonFile::parseJson($res);
|
|
|
|
return $this->infoCache[$identifier] = JsonFile::parseJson($res);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$composer = $this->getBaseComposerInformation($identifier);
|
|
|
|
$composer = $this->getBaseComposerInformation($identifier);
|
|
|
|
|
|
|
|
|
|
|
|
$this->cache->write($identifier.'.json', json_encode($composer));
|
|
|
|
if ($this->shouldCache($identifier)) {
|
|
|
|
|
|
|
|
$this->cache->write($identifier.'.json', json_encode($composer));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$this->infoCache[$identifier] = $composer;
|
|
|
|
$this->infoCache[$identifier] = $composer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|