bruensicke/li3_redis

Example of Lithium connection usage

Closed this issue · 3 comments

I think having an example of a Redis connection in the README would be very helpful. Especially for those of us who are slightly less familiar with Lithium. A listing of possible values for configuration would be great.

d1rk commented

Hi @blissdev - thanks for your feedback. You are totally right. I am currently working on more in-depth documentation as well. I will try to cover your topic in the README, as it is something everyone has to deal with.

I'm not trying to hurry you, but can you show any simple example of how to create connection to Redis in /bootstrap/connections.php? I can to install submodule, but have no idea how to use it.

d1rk commented

@tommiv sure, you just have to name it with li3_redis (this is the default):

Connections::add('li3_redis', array(
    'type' => 'Redis',
    'host' => '127.0.0.1:6379',
    'database' => 1,
    'persistent' => true,
    'expiry' => 0,
));

all li3_redis based connections to the redis will use this connection.