Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

docs: now we recommend lua-resty-memcached instead when being used wi…

…th ngx_lua.
  • Loading branch information...
commit 4998d3a507fe02f896922afecaac8caebedfabc3 1 parent cdc2f9e
@agentzh agentzh authored
Showing with 10 additions and 0 deletions.
  1. +6 −0 README
  2. +2 −0  README.markdown
  3. +2 −0  doc/HttpMemcModule.wiki
View
6 README
@@ -115,6 +115,12 @@ Description
If you are going to use this module to cache location responses out of
the box, try [[HttpSRCacheModule]] with this module to achieve that.
+ When used in conjunction with [[HttpLuaModule]], it is recommended to
+ use the lua-resty-memcached
+ (<http://github.com/agentzh/lua-resty-memcached>) library instead of
+ this module though, because the former is much more flexible and
+ memory-efficient.
+
Keep-alive connections to memcached servers
You need [[HttpUpstreamKeepaliveModule]] together with this module for
keep-alive TCP connections to your backend memcached servers.
View
2  README.markdown
@@ -126,6 +126,8 @@ This module is not supposed to be merged into the Nginx core because I've used [
If you are going to use this module to cache location responses out of the box, try [HttpSRCacheModule](http://wiki.nginx.org/HttpSRCacheModule) with this module to achieve that.
+When used in conjunction with [HttpLuaModule](http://wiki.nginx.org/HttpLuaModule), it is recommended to use the [lua-resty-memcached](http://github.com/agentzh/lua-resty-memcached) library instead of this module though, because the former is much more flexible and memory-efficient.
+
Keep-alive connections to memcached servers
-------------------------------------------
View
2  doc/HttpMemcModule.wiki
@@ -117,6 +117,8 @@ This module is not supposed to be merged into the Nginx core because I've used [
If you are going to use this module to cache location responses out of the box, try [[HttpSRCacheModule]] with this module to achieve that.
+When used in conjunction with [[HttpLuaModule]], it is recommended to use the [http://github.com/agentzh/lua-resty-memcached lua-resty-memcached] library instead of this module though, because the former is much more flexible and memory-efficient.
+
== Keep-alive connections to memcached servers ==
You need [[HttpUpstreamKeepaliveModule]] together with this module for keep-alive TCP connections to your backend memcached servers.

3 comments on commit 4998d3a

@baina

lua-resty-memcached and memc-nginx-module, which supports Consistent Hashing?

@agentzh
Owner
@baina

To use a CRC-32 computation compatible with PECL Memcache I find out one module named "ngx_http_upstream_hash_module" , so thanks for Evan Miller and you. Maybe it satisfy my desire to lazy.. hah ^_^

but the real reason is I don't know how to insert lua into the source script under memc-nginx-module..

location / {
  if ($request_method = GET)
  {
    add_header X-Powered-By "htmlCache/0.5.5.1";
    set $key $uri$args;
    srcache_fetch GET /memc $key;
    srcache_store PUT /memc $key;
    proxy_pass http://$iisweb;
  }
}

I believe lua-resty-memcached supports memcached upstream . so I'm checking the lua script syntax ,

    local ok, err = memc:connect(upstreamc_range)

upstreamc_range can be stead of the ("ip", port) ?

Please sign in to comment.
Something went wrong with that request. Please try again.