tollmanz / wordpress-pecl-memcached-object-cache

A WordPress object cache that uses the memcached (not memcache) PECL extension.
233 stars 114 forks source link

maybe could support for the unix socket? #42

Open kn007 opened 10 years ago

kn007 commented 10 years ago

Using like this: $memcached_servers = 'unix:/tmp/memcached.sock'; or $memcached_servers = 'unix:///tmp/memcached.sock:0';

tollmanz commented 10 years ago

Hi @kn007! I totally missed this ticket. Can you tell me more about this? What are the benefits? Is this likely to work for the majority? What problems might creep in?

TheLastCicada commented 10 years ago

I know WPEngine uses memcached sockets for connecting - they should be faster as they don't have to deal with all the TCP overhead. However, they'll only be useful when running locally - you'd still need to use TCP if connecting to a remote memcached instance. I've not used them before myself, but would be intrigued to have that option here.

kn007 commented 9 years ago

@tollmanz Thank you for you reply. This object-cache.php is very useful. My wordpress web site and my memcached server in the same VPS, so it will be faster(less waiting time) when using socket file in high load avg status. Thanks @TheLastCicada , Memcached version > 2.0.0b1 could using unix socket file. E.g. addServer('/tmp/memcached.sock',0); We can do it ourselves. Not to be confused with Memcache that use 'unix:///path/to/socket'(via php.net)

tollmanz commented 9 years ago

@kn007 This is definitely something I want to explore. I like the idea especially if there is a measurable improvement in speed. Thanks for the added information. Hopefully we'll be able to get to this some day.