remove redundant cache prefix
authorMichael Wallner <mike@php.net>
Mon, 11 May 2015 15:36:09 +0000 (17:36 +0200)
committerMichael Wallner <mike@php.net>
Mon, 11 May 2015 15:40:59 +0000 (17:40 +0200)
app/Github/API/Call.php
app/Github/Storage/Redis.php

index 8b09d27f451b40a935ce97780659b0cbd3acd596..32bf1cb0c89bd7e46aa9c0ad70727c55fb8afd06 100644 (file)
@@ -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));
        }
 
index 5833a5bae854c1267dcd2ce922c786ebdbb6daa7..13d641a18afb609f97aa551c3d3fc7140a3d6d44 100644 (file)
@@ -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();