}
$this->enqueue($callback);
- return $this->api->getClient();
+ return $this;
}
/**
return strtolower(end($parts));
}
+ /**
+ * Call Client::send()
+ */
+ function send() {
+ return $this->api->getClient()->send();
+ }
+
/**
* Get associated cache storage
* @param int $ttl out param of configure ttl
}
function getCacheKey() {
+ $args = $this->args;
+ unset($args["fresh"]);
+ ksort($args);
return sprintf("github:%s:%s:%s", $this->api->getToken(), $this,
- new QueryString($this->args));
+ new QueryString($args));
}
function readFromCache(array &$cached = null, &$ttl = null) {
$cache->set($key, $fresh, $ttl);
}
}
+
+ function dropFromCache() {
+ if (($cache = $this->api->getCacheStorage())) {
+ $key = $this->getCacheKey();
+ $cache->del($key);
+ }
+ }
}