The "conection [cache] not configured" error occurs when you don't have a connection with that name configured.
You need configure in config/database.php. Normaly, only have "default":
'default' => [
[
'host' => env('REDIS_HOST_1', '127.0.0.1'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT_1', 1234),
'database' => 0,
]
]
you need add extra:
'cache' => [
[
'host' => env('REDIS_HOST_1', '127.0.0.1'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT_1', 1234),
'database' => 0,
]
]
This way, you'll be able to use two connections, one specific to the cache and one for queues for example.
you'd have to put in config/cache.php:
'redis' => [
'driver' => 'redis',
'connection' => 'cache',
]
and put in config/queue.php:
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => '{default}',
'retry_after' => 90,
],
In the 'connection' section, only the values configured in 'database.php' will be available.
This also requires that the required users in the cluster be configured in redis or that the connections be separated by database. But that's already at the Redis service configuration level.