The Cache class in laravel has methods such as get(\'itemKey\') to retrieve items from the cache, and remember(\'itemKey\', [\'myData1\', \'myData2\']) to save items in the cach
in \config\database.php
make a redis store for the cache
// store cache in their own redis store ...
'cache-connection' => [
'host' => ...,
'password' => ...,
'port' => env('REDIS_PORT', 6379),
'database' => 2,
'read_write_timeout' => 60,
'timeout' => 6.0,
],
in \config\cache.php
use this redis database
'stores' => [
...
'redis' => [
'driver' => 'redis',
'connection' => 'cache-connection',
],
],
now you can use Redis class to check what is in your cache
$a = Redis::connection('cache-connection')->keys('*');
\Log::debug($a);