memcached_pass
Proxies a location to a memcached get, nginx's own read-only single-key gateway.
| Syntax | memcached_pass address | unix:path | upstream_name; |
|---|---|
| Contexts | locationif in location |
Behavior
Issues one get $memcached_key against the target and maps the reply to 200 (hit), 404 (miss) or 502 (invalid reply). $memcached_key must be set explicitly; there is no automatic key derivation. Use memc_pass for the full memcached command set including writes.
Example
location /cache/ {
set $memcached_key $uri;
memcached_pass 127.0.0.1:11211;
}