Skip to main content
Topic: Memcached Unix Sockets support (Read 1886 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Memcached Unix Sockets support

Reply #1

I don't recall adding it either but agree it should be easy to add.  Something for 1.1 I'd guess, maybe 1.05 if there is a demand.

Re: Memcached Unix Sockets support

Reply #2

I didn't post it to GH because I didn't check it. I looked at the code and it doesn't look like it does.

Maybe 1.1 could use Stash ;)

Re: Memcached Unix Sockets support

Reply #3

Always a possibility :D

Re: Memcached Unix Sockets support

Reply #4

All I'm going to do for this is change the connection logic to:
Code: [Select]
$memcached = memcache_connect($server[0], !isset($server[1]) ? 11211 : $server[1]);
Currently it uses empty() on the check so you can't pass a 0 as the port parameter and thats what you need to do to use sockets according to the docs.
Quoteport
The port on which memcache is running. Usually, this is 11211. As of version 2.0.0b1, set this parameter to 0 when using UNIX domain sockets.

Also the helptext needs to be updated with the underlined text
$helptxt['cache_memcached'] = 'If you are using memcached you need to provide the server details. This should be entered as a comma separated list as shown in the example below:

   "server1,server2,server3:port,server4"

Note that if no port is specified the software will use port 11211, set this to 0 when using UNIX domain sockets. The system will also attempt to perform rough/random load balancing across the specified servers.';



Maybe in 1.1 we should add weight support as well ...

Re: Memcached Unix Sockets support

Reply #5

I say in 1.1 move to a 3rd party cache library. It's not worth it trying to get everything working with every driver.