Redis cashing issue with ::remember

Posted 1 year ago by francois


I have this kind of code :

$response = \Cache::remember($this->context->context->id . 'instagram', 1440, function () {
                $data = $this->instagramScraper->make($this->context->context->socials['instagram']);
                return $this->instagramTransformer->transformCollection($data);
return $this->respond($response);

Cache key is created on redis, and values are correct, but the callback is executed every single time. I say this because my API endpoint is responding in more than 3s.


Please sign in or create an account to participate in this conversation.