|
8 | 8 | Table of Contents
|
9 | 9 | =================
|
10 | 10 |
|
| 11 | +* [Name](#name) |
11 | 12 | * [Status](#status)
|
12 | 13 | * [Version](#version)
|
13 | 14 | * [Synopsis](#synopsis)
|
@@ -261,7 +262,7 @@ where we define a connection pool which holds up to 10 keep-alive connections (p
|
261 | 262 | Caching with Redis
|
262 | 263 | ------------------
|
263 | 264 |
|
264 |
| -One annoyance with Memcached backed caching is Memcached server's 1 MB value size limit. So it is often desired to use some more permissive backend storage services like Redis to serve as this module's backend. |
| 265 | +Redis is an alternative key-value store with many additional features. |
265 | 266 |
|
266 | 267 | Here is a working example by using Redis:
|
267 | 268 |
|
@@ -494,7 +495,7 @@ srcache_store_max_size
|
494 | 495 |
|
495 | 496 | When the response body length is exceeding this size, this module will not try to store the response body into the cache using the subrequest template that is specified in [srcache_store](#srcache_store).
|
496 | 497 |
|
497 |
| -This is particular useful when using cache storage backend that does have a hard upper limit on the input data. For example, for Memcached server, the limit is usually `1 MB`. |
| 498 | +This is particular useful when using a cache storage backend that does have a hard upper limit on the input data. For example, the Memcached server has a default limit of `1 MB` by item. |
498 | 499 |
|
499 | 500 | When `0` is specified (the default value), there's no limit check at all.
|
500 | 501 |
|
@@ -991,6 +992,8 @@ Several common pitfalls for beginners:
|
991 | 992 | * The original response carries a `Cache-Control` header that explicitly disables caching and you do not configure directives like [srcache_response_cache_control](#srcache_response_cache_control).
|
992 | 993 | * The original response is already gzip compressed, which is not cached by default (see [srcache_ignore_content_encoding](#srcache_ignore_content_encoding)).
|
993 | 994 | * Memcached might return `CLIENT_ERROR bad command line format` when using a too long key (250 chars as of version 1.4.25). It is thus safer to use `set_md5 $key $uri$args;` instead of `set $key $uri$args;`. The `set_md5` directive (and more) is available from [OpenResty's set-misc module](https://github.com/openresty/set-misc-nginx-module).
|
| 995 | +* Nginx might return `client intended to send too large body` when trying to store objects larger than 1m to the storage backend, in which case nginx `client_max_body_size` must be set to a higher value. |
| 996 | +* Memcached might fail to store objects larger than 1m, causing errors like `srcache_store subrequest failed status=502`. Since version 1.4.2, memcached supports a command-line `-I` option to override the default size of each slab page. Please read its manpage for more information. |
994 | 997 |
|
995 | 998 | [Back to TOC](#table-of-contents)
|
996 | 999 |
|
@@ -1146,3 +1149,5 @@ See Also
|
1146 | 1149 | * [set-misc-nginx-module](https://github.com/openresty/set-misc-nginx-module)
|
1147 | 1150 | * The [openresty bundle](http://openresty.org)
|
1148 | 1151 |
|
| 1152 | +[Back to TOC](#table-of-contents) |
| 1153 | + |
0 commit comments