mardi 17 mai 2022

Why Redis keys are not created sometimes?

Radis doesn't get cached when I name getFeaturedCatalogsBySubCategoryId but it does get cache when I name getFeaturedCatalogBySubCategoryId.

The code format is this...

not working

if (!Cache::has("getFeaturedCatalogsBySubCategoryId:7e6xbmsd929914d:3nmlshec8da391f:1:10")) {
  $result = Cache::rememberforever('getFeaturedCatalogsBySubCategoryId:7e6xbmsd929914d:3nmlshec8da391f:1:10', function () {
    return DB::select('SELECT * FROM users');
  });
}

It doesn't work when I write like getFeaturedCatalogsBySubCategoryId but it works when I write like getFeaturedCatalogBySubCategoryId.This problem has been found with many cache keys so what can be the solution.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/C29gnE6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire