mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-14 15:09:31 +00:00
Get specifications, mass, footprint and manufacturer status from Octopart
This commit is contained in:
parent
0f336b6f89
commit
d969f49ecc
2 changed files with 73 additions and 8 deletions
|
|
@ -76,6 +76,8 @@ final class PartInfoRetriever
|
|||
//Generate key and escape reserved characters from the provider id
|
||||
$escaped_keyword = urlencode($keyword) . uniqid();
|
||||
|
||||
dump("Remove the uniqid() from the escaped_part_id variable to use the cache");
|
||||
|
||||
return $this->partInfoCache->get("search_{$provider->getProviderKey()}_{$escaped_keyword}", function (ItemInterface $item) use ($provider, $keyword) {
|
||||
//Set the expiration time
|
||||
$item->expiresAfter(self::CACHE_RESULT_EXPIRATION);
|
||||
|
|
@ -96,8 +98,9 @@ final class PartInfoRetriever
|
|||
$provider = $this->provider_registry->getProviderByKey($provider_key);
|
||||
|
||||
//Generate key and escape reserved characters from the provider id
|
||||
$escaped_part_id = urlencode($part_id);
|
||||
$escaped_part_id = urlencode($part_id) .uniqid();
|
||||
|
||||
dump("Remove the uniqid() from the escaped_part_id variable to use the cache");
|
||||
|
||||
return $this->partInfoCache->get("details_{$provider_key}_{$escaped_part_id}", function (ItemInterface $item) use ($provider, $part_id) {
|
||||
//Set the expiration time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue