Redis cache using a socket

nodle

Well-known member
#1
My host uses a socket for both Memcache and Redis. Apparently it's faster than using an IP. My question is I can't seem to configure it properly. It is enabled under my PHP setting and is active. This is the defualt setting for Redis according to the manual.
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Redis';
$config['cache']['config'] = [
'host' => '127.0.0.1',
'password' => 'password'
];
I have tried to paste it under the host, then with no password since I don't have one. Along with changing host to database, and port. Still will not work. Any idea or has anyone used a socket with Redis? Thanks!
 

nodle

Well-known member
#2
I may have gotten it to work by using this below in case others run into the same problem. If someone could tell me if this looks ok that would be helpful:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Redis';
$config['cache']['config'] = [
'host' => '/home/pathtoyoursocket.sock',
'port' => 0,
];
Also is there a way to tell if Redis is actually working?
 
Top