Update Indexer.php
parent
fb75ec49bd
commit
bae4f35744
|
@ -152,12 +152,16 @@ class Indexer
|
||||||
// Dynamic constraints are not cached, because they can change every time
|
// Dynamic constraints are not cached, because they can change every time
|
||||||
$packageVersion = ltrim($package->version, 'v');
|
$packageVersion = ltrim($package->version, 'v');
|
||||||
if ($package->name === $packageName) {
|
if ($package->name === $packageName) {
|
||||||
$packageKey = $packageName . ':' . $packageVersion;
|
|
||||||
if (strpos($packageVersion, 'dev') !== false) {
|
if (strpos($packageVersion, 'dev') !== false) {
|
||||||
$packageKey = $packageName . ':' . (isset($package->source) && isset($package->source->reference) ?
|
if (isset($package->source) && isset($package->source->reference)) {
|
||||||
$package->source->reference : (isset($package->dist) && isset($package->dist->reference) ?
|
$packageVersion = $package->source->reference;
|
||||||
$package->source->reference : $packageVersion));
|
} else {
|
||||||
|
if (isset($package->dist) && isset($package->dist->reference)) {
|
||||||
|
$packageVersion = $package->source->reference;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$packageKey = $packageName . ':' . $packageVersion;
|
||||||
$cacheKey = self::CACHE_VERSION . ':' . $packageKey;
|
$cacheKey = self::CACHE_VERSION . ':' . $packageKey;
|
||||||
// Check cache
|
// Check cache
|
||||||
$index = yield $this->cache->get($cacheKey);
|
$index = yield $this->cache->get($cacheKey);
|
||||||
|
|
Loading…
Reference in New Issue