Using Redis for Queues for Multiple Laravel Applications on a Single Server

前端 未结 3 1417
一向
一向 2020-12-16 19:18

I have a production laravel application and the staging application running on the same server. I am running redis, which I am using as my queue driver. They are obviously c

3条回答
  •  不知归路
    2020-12-16 19:58

    You can set the prefix Laravel uses for the Redis cache. By default this is laravel, so all keys are stored as laravel:keyname and Laravel takes care of the logic to add/remove this prefix when saving/getting.

    You can set the prefix in config/cache.php. You could leave the main one as laravel and set your staging app prefix to stage or something. This will mean multiple Laravel apps can use the same Redis instance.

提交回复
热议问题