Mercurial > hg > nginx
changeset 2662:40f9def49ed5
cache GET requests only
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 03 Apr 2009 12:06:04 +0000 |
parents | 8ace9dee8824 |
children | 09725d69cb25 |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -531,6 +531,10 @@ ngx_http_upstream_cache(ngx_http_request ngx_int_t rc; ngx_http_cache_t *c; + if (!(r->method & NGX_HTTP_GET)) { + return NGX_DECLINED; + } + c = ngx_pcalloc(r->pool, sizeof(ngx_http_cache_t)); if (c == NULL) { return NGX_ERROR;