Namoshek / laravel-redis-sentinel

An extension of Laravels Redis driver which supports connecting to a Redis master through Redis Sentinel.
MIT License
20 stars 17 forks source link

Multiple redis dbs #31

Closed LyKos4 closed 5 months ago

LyKos4 commented 5 months ago

Can we use this package and configuration for multiple redis databases used? For example if we have DB=0 for default, DB=1 for cache, ... etc , will we be able to use this configuration to connect to sentinel the items that we want to have multiple redis instances and rest have a separate single redis instance ?

Namoshek commented 5 months ago

Yes, you can do that. Redis Sentinel is only responsible for discovery of Redis instances and this package facilitates that. The selection of the actual database being used happens on the Redis instance after discovery through Redis Sentinel. You can simply add multiple connections with the driver provided by this package instead of the default driver.