We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c6ee8d4 + 90e463d commit 660d997Copy full SHA for 660d997
1 file changed
src/Services/Script.php
@@ -315,7 +315,8 @@ protected function processRequest()
315
$result = ResponseFactory::create($result);
316
}
317
318
- if ($cacheKey) {
+ $status = $result->getStatusCode();
319
+ if ($cacheKey && (($status >= 200) && ($status < 300))) { // do not cache error responses
320
$this->addToCache($cacheKey, $result);
321
322
0 commit comments