Skip to content

Commit 6d2b9cd

Browse files
author
Lee Hicks
committed
Do not cache full responses with error status codes
1 parent e2c53c2 commit 6d2b9cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Services/Script.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ protected function processRequest()
315315
$result = ResponseFactory::create($result);
316316
}
317317

318-
if ($cacheKey) {
318+
if ($cacheKey && ($result->getStatusCode() < 300)) {
319319
$this->addToCache($cacheKey, $result);
320320
}
321321

0 commit comments

Comments
 (0)