'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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source