I have this piece of code that I thought would be remembered forever:
$setting = \Cache::remember('website_description', 0, function() {
return App\Models\Setting::where('name', 'website_description')->first();
});
But he does not remember at all, someone told me that passing a function 0to remember will make him remember forever. Since this does not work, in what other way can I put an item in the cache forever?
source
share