M
M
miki1312015-04-01 18:09:55
Redis
miki131, 2015-04-01 18:09:55

How to create 2 laravel sites on the same server and on the same redis?

On the same server, 2 sites written in Laravel are running.
Both sites use redis for sessions and both have in their database.php config

'redis' => [

    'cluster' => false,

    'default' => [
      'host'     => '127.0.0.1',
      'port'     => 6379,
      'database' => 0,
    ],

  ],

Sites will not interfere with each other? Or do you need some other settings.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Shikanov, 2015-04-01
@miki131

The 'database' key must have different values. Set the first site to 0 and the second to 1 and they won't conflict, as long as you don't use server-level commands like FLUSHALL .

R
Ramallah, 2015-04-01
@ramallah

If the names of the keys are the same, then they can overlap each other.
Namely, if both sites have something like:
$redis->set('name', 'Taylor');
What will we get?????

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question