$lowVerb = strtolower($verb);
if ($lowVerb === 'get' && $this->cache) {
- $cachePath = 'get/' . md5($url);
+ $cachePath = 'get_' . md5($url);
$cacheLine = $this->cache->get($cachePath);
if ($cacheLine && $cacheLine['expires'] > CRM_Utils_Time::getTimeRaw()) {
return $cacheLine['data'];
if ($lowVerb === 'get' && $this->cache) {
$expires = CRM_Utils_Http::parseExpiration($result[0]);
if ($expires !== NULL) {
- $cachePath = 'get/' . md5($url);
+ $cachePath = 'get_' . md5($url);
$cacheLine = array(
'url' => $url,
'expires' => $expires,
return $result;
}
+ /**
+ * Create stream options.
+ *
+ * @param string $verb
+ * @param string $url
+ * @param string $blob
+ * @param array $headers
+ *
+ * @return array
+ * @throws \Exception
+ */
protected function createStreamOpts($verb, $url, $blob, $headers) {
$result = parent::createStreamOpts($verb, $url, $blob, $headers);
return $result;
}
+ /**
+ * @return \CRM_Utils_Cache_Interface|null
+ */
+ public function getCache() {
+ return $this->cache;
+ }
+
}