- if (empty($this->args["fresh"]) && ($cache = $this->api->getCacheStorage())) {
- $key = $this->getCacheKey();
-
- if ($cache->get($key, $cached)) {
- call_user_func_array($callback, $cached);
- return $this->api->getClient();
- }
+ if ($this->readFromCache($cached)) {
+ call_user_func_array($callback, $cached);
+ } else {
+ $this->enqueue($callback);