Skip to content

Commit 3e66a16

Browse files
committed
Limit caching to GET requests only
1 parent d78c57f commit 3e66a16

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Github/HttpClient/CachedHttpClient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public function request($path, $body = null, $httpMethod = 'GET', array $headers
6868
return $cacheResponse;
6969
}
7070

71-
$this->getCache()->set($this->id, $response);
71+
if ($httpMethod == 'GET') {
72+
$this->getCache()->set($this->id, $response);
73+
}
7274

7375
return $response;
7476
}

0 commit comments

Comments
 (0)