From: Michael Wallner Date: Mon, 11 May 2015 15:36:09 +0000 (+0200) Subject: remove redundant cache prefix X-Git-Url: https://git.m6w6.name/?p=pharext%2Fpharext.org;a=commitdiff_plain;h=47343850bc7ab2851d1c6633b65742c43a50d02e remove redundant cache prefix --- diff --git a/app/Github/API/Call.php b/app/Github/API/Call.php index 8b09d27..32bf1cb 100644 --- a/app/Github/API/Call.php +++ b/app/Github/API/Call.php @@ -58,10 +58,8 @@ abstract class Call function __invoke(callable $callback) { if ($this->readFromCache($cached)) { - header("X-Cache-Hit: $this", false); call_user_func_array($callback, $cached); } else { - header("X-Cache-Miss: $this", false); $this->enqueue($callback); } return $this; @@ -99,7 +97,7 @@ abstract class Call $args = $this->args; unset($args["fresh"]); ksort($args); - return sprintf("github:%s:%s:%s", $this->api->getToken(), $this, + return sprintf("%s:%s:%s", $this->api->getToken(), $this, new QueryString($args)); } diff --git a/app/Github/Storage/Redis.php b/app/Github/Storage/Redis.php index 5833a5b..13d641a 100644 --- a/app/Github/Storage/Redis.php +++ b/app/Github/Storage/Redis.php @@ -38,7 +38,6 @@ class Redis implements Storage } $now = time(); $ltl = $ttl - ($now - $set); - header("X-Cache-Times: ltl=$ltl,now=$now,set=$set,ttl=$ttl", false); if ($ltl >= 0) { if ($update) { $item->time = time();