When using redis through a unix socket (ex: unix:///var/run/redis/redis.sock), instead of a tcp port, joomla can't connect to redis.
It seems to be a simple change, for instance, in line 94 (https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/cache/storage/redis.php#L94), put
if ($server['port']=='0') $connection = static::$_redis->pconnect(str_replace('unix://','',$server['host']));
else $connection = static::$_redis->pconnect($server['host'], $server['port']);
This way if port = 0 it will try to connect wirh a unix socket path (with or without unix://).
I think this is the way memcached joomla cache works too.
The same applies as to be made for persistent connections in the next lines of code.
Tested this simple change and worked.
Labels |
Added:
?
|
Category | ⇒ | Cache Libraries |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-27 23:22:54 |
Closed_By | ⇒ | brianteeman |
I discovered that if you put in joomla global config:
But since memcached with linux sockets works in a different way, for instance:
Shouldn't this be normalized in Joomla like it is for TCP connections?
Example:
This way the config option will have the same normalization for each connection.