Skip to content

Commit

Permalink
updated docs from the wiki page.
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh committed Sep 28, 2011
1 parent ce0986f commit f514afa
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 15 deletions.
16 changes: 13 additions & 3 deletions README
Expand Up @@ -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
Expand Down Expand Up @@ -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*
Expand Down Expand Up @@ -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*

Expand All @@ -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
Expand All @@ -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/

Expand Down
24 changes: 17 additions & 7 deletions README.markdown
Expand Up @@ -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
===========

Expand Down Expand Up @@ -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*
Expand Down Expand Up @@ -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
============
Expand All @@ -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/

Expand Down
22 changes: 17 additions & 5 deletions doc/HttpMemcModule.wiki
Expand Up @@ -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].
Expand Down Expand Up @@ -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''
Expand Down Expand Up @@ -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 =

Expand All @@ -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/

Expand Down

0 comments on commit f514afa

Please sign in to comment.