Example #1
0
 /**
  * Wrapper method to get PIFT jobs, using cache.
  *
  * @param array $options
  * @param bool $reset
  * @return false|\mglaman\DrupalOrg\RawResponse|mixed
  */
 protected function getPiftJobs(array $options, $reset = false)
 {
     $cid = implode(':', ['pift:jobs:', implode(':', $options)]);
     $cached = $this->getCacheKey($cid);
     if ($cached === FALSE || $reset) {
         $this->debug("Cache MISS for {$cid}");
         $cached = $this->client->getPiftJobs($options);
         $this->setCacheKey($cid, $cached, 60);
     } else {
         $this->debug("Cache HIT for {$cid}");
     }
     return $cached;
 }