Answer the question
In order to leave comments, you need to log in
How to keep the old cache value if the new one is not available?
$response = \Cache::remember('cache-key', 3600, function () {
$response = Client::get(); //http запрос
if ($response) {
return $response;
}
return false;
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question