Memcached module using unix sockets

I configured nginx to try memcached for the page before passing the
request to the backend. However, the memcached module cannot find the
data at any key given. My assumption is that the module does not
support unix sockets. Is this true?

Configuration example:

location / {
try_files @memcached @django;
}

location @memcached {
set $memcached_key ngx$request_uri;
memcached_pass unix:/Users/auser/memcached.sock;
default_type text/html;
}

location @django {
proxy_pass http://127.0.0.1:8000;
}

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,5279,5279#msg-5279

On Fri, Aug 28, 2009 at 05:19:55PM -0400, bryanp wrote:

set $memcached_key  ngx$request_uri;
memcached_pass      unix:/Users/auser/memcached.sock;
default_type        text/html;

}

location @django {
proxy_pass http://127.0.0.1:8000;
}

try_files parameters can be files only, except the last, fallback
parameter.
As to using local (and not only) memcached, it’s much better to use
nginx’s
proxy_cache.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs