Permalink
Browse files

updated docs from the wiki page.

  • Loading branch information...
agentzh committed Sep 28, 2011
1 parent ce0986f commit f514afa4a952d6c4973525e3c89952b7821b00a3
Showing with 47 additions and 15 deletions.
  1. +13 −3 README
  2. +17 −7 README.markdown
  3. +17 −5 doc/HttpMemcModule.wiki
View
16 README
@@ -88,6 +88,14 @@ Synopsis
memc_flags_to_last_modified on;
}
+ location /memc {
+ set $memc_key foo;
+ set $memc_cmd get;
+
+ # access the unix domain socket listend by memcached
+ memc_pass unix:/tmp/memcached.sock;
+ }
+
Description
This module extends the standard [module (HttpMemcachedModule)] to
support almost the whole memcached ascii protocol
@@ -328,6 +336,8 @@ Directives
syntax: *memc_pass <upstream_backend_name>*
+ syntax: *memc_pass unix:<path_to_unix_domain_socket>*
+
default: *none*
context: *http, server, location, if*
@@ -417,7 +427,7 @@ Directives
This time must be less than 597 hours.
memc_buffer_size
- syntax: *memc_buffer_size <time>*
+ syntax: *memc_buffer_size <size>*
default: *4k/8k*
@@ -430,7 +440,7 @@ Directives
* the complete response header (i.e., the first line of the response)
for the "get" memcached command.
- This default size is the page size, may be 4k or 8k.
+ This default size is the page size, may be "4k" or "8k".
Installation
You're recommended to install this module (as well as the Nginx core and
@@ -445,7 +455,7 @@ Installation
example, the version 1.0.5 (see nginx compatibility), and then build the
source with this module:
- $ wget 'http://sysoev.ru/nginx/nginx-1.0.5.tar.gz'
+ $ wget 'http://nginx.org/download/nginx-1.0.5.tar.gz'
$ tar -xzvf nginx-1.0.5.tar.gz
$ cd nginx-1.0.5/
View
@@ -100,6 +100,16 @@ Synopsis
}
+
+ location /memc {
+ set $memc_key foo;
+ set $memc_cmd get;
+
+ # access the unix domain socket listend by memcached
+ memc_pass unix:/tmp/memcached.sock;
+ }
+
+
Description
===========
@@ -346,10 +356,10 @@ memc_pass
**syntax:** *memc_pass &lt;memcached server hostname&gt;:&lt;memcached server port&gt;*
-**syntax:** *memc_pass &lt;unix:/full/path/for/memcached.socket&gt;*
-
**syntax:** *memc_pass &lt;upstream_backend_name&gt;*
+**syntax:** *memc_pass unix:&lt;path_to_unix_domain_socket&gt;*
+
**default:** *none*
**context:** *http, server, location, if*
@@ -435,18 +445,18 @@ This time must be less than 597 hours.
memc_buffer_size
----------------
-**syntax:** *memc_buffer_size &lt;time&gt;*
+**syntax:** *memc_buffer_size &lt;size&gt;*
**default:** *4k/8k*
**context:** *http, server, location*
This buffer size is used for the memory buffer to hold
-* the complete response for memcached commands other than "get",
-* the complete response header (i.e., the first line of the response) for the "get" memcached command.
+* the complete response for memcached commands other than `get`,
+* the complete response header (i.e., the first line of the response) for the `get` memcached command.
-This default size is the page size, may be 4k or 8k.
+This default size is the page size, may be `4k` or `8k`.
Installation
============
@@ -459,7 +469,7 @@ Grab the nginx source code from [nginx.org](http://nginx.org/), for example,
the version 1.0.5 (see [nginx compatibility](http://wiki.nginx.org/HttpMemcModule#Compatibility)), and then build the source with this module:
- $ wget 'http://sysoev.ru/nginx/nginx-1.0.5.tar.gz'
+ $ wget 'http://nginx.org/download/nginx-1.0.5.tar.gz'
$ tar -xzvf nginx-1.0.5.tar.gz
$ cd nginx-1.0.5/
View
@@ -97,6 +97,16 @@ This document describes memc-nginx-module [http://github.com/agentzh/memc-nginx-
}
</geshi>
+<geshi lang="nginx">
+ location /memc {
+ set $memc_key foo;
+ set $memc_cmd get;
+
+ # access the unix domain socket listend by memcached
+ memc_pass unix:/tmp/memcached.sock;
+ }
+</geshi>
+
= Description =
This module extends the standard [[HttpMemcachedModule|memcached module]] to support almost the whole [http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt memcached ascii protocol].
@@ -325,6 +335,8 @@ Here we only document the most important two directives (the latter is a new dir
'''syntax:''' ''memc_pass <upstream_backend_name>''
+'''syntax:''' ''memc_pass unix:<path_to_unix_domain_socket>''
+
'''default:''' ''none''
'''context:''' ''http, server, location, if''
@@ -404,18 +416,18 @@ It's wise to always explicitly specify the time unit to avoid confusion. Time un
This time must be less than 597 hours.
== memc_buffer_size ==
-'''syntax:''' ''memc_buffer_size <time>''
+'''syntax:''' ''memc_buffer_size <size>''
'''default:''' ''4k/8k''
'''context:''' ''http, server, location''
This buffer size is used for the memory buffer to hold
-* the complete response for memcached commands other than "get",
-* the complete response header (i.e., the first line of the response) for the "get" memcached command.
+* the complete response for memcached commands other than <code>get</code>,
+* the complete response header (i.e., the first line of the response) for the <code>get</code> memcached command.
-This default size is the page size, may be 4k or 8k.
+This default size is the page size, may be <code>4k</code> or <code>8k</code>.
= Installation =
@@ -427,7 +439,7 @@ Grab the nginx source code from [http://nginx.org/ nginx.org], for example,
the version 1.0.5 (see [[#Compatibility|nginx compatibility]]), and then build the source with this module:
<geshi lang="bash">
- $ wget 'http://sysoev.ru/nginx/nginx-1.0.5.tar.gz'
+ $ wget 'http://nginx.org/download/nginx-1.0.5.tar.gz'
$ tar -xzvf nginx-1.0.5.tar.gz
$ cd nginx-1.0.5/

0 comments on commit f514afa

Please sign in to comment.