You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if the findOne method in Cristal\ApiWrapper\Api purposely doesn't save to cache like the other find methods do. It does check if the cache key exists so it seems like more of an omission.
* Call API for find entity of entrypoint.
*
* @param string $endpoint
* @param int $id
* @param array $filters
*
* @return array
*/
protected function findOne(string $endpoint, $id, array $filters = [])
{
$uri = '/'.$endpoint.'/'.$id;
$key = $uri.'?'.http_build_query($filters);
if ($this->hasCache($key)) {
return $this->getCache($key);
}
return $this->getTransport()->request($uri, $filters) ?? []; // <-- doesn't save to cache but checks for cache in above if statement
}
The text was updated successfully, but these errors were encountered:
I was wondering if the findOne method in Cristal\ApiWrapper\Api purposely doesn't save to cache like the other find methods do. It does check if the cache key exists so it seems like more of an omission.
The text was updated successfully, but these errors were encountered: