diff --git a/src/Marketplace/Client.php b/src/Marketplace/Client.php index c8730e7720..2322717248 100644 --- a/src/Marketplace/Client.php +++ b/src/Marketplace/Client.php @@ -55,13 +55,12 @@ public function get($endpoint, $params = []) { $lock = $this->lock(static::LOCK_KEY, 10); + $endpoint = collect([$this->domain, self::API_PREFIX, $endpoint])->implode('/'); + $key = 'marketplace-'.md5($endpoint.json_encode($params)); + try { $lock->block(5); - $endpoint = collect([$this->domain, self::API_PREFIX, $endpoint])->implode('/'); - - $key = 'marketplace-'.md5($endpoint.json_encode($params)); - return $this->cache()->rememberWithExpiration($key, function () use ($endpoint, $params) { $response = Guzzle::request('GET', $endpoint, [ 'verify' => $this->verifySsl,