comparison src/http/ngx_http_upstream.c @ 2662:40f9def49ed5

cache GET requests only
author Igor Sysoev <igor@sysoev.ru>
date Fri, 03 Apr 2009 12:06:04 +0000
parents 3a8a53c0c42f
children 09725d69cb25
comparison
equal deleted inserted replaced
2661:8ace9dee8824 2662:40f9def49ed5
529 ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u) 529 ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
530 { 530 {
531 ngx_int_t rc; 531 ngx_int_t rc;
532 ngx_http_cache_t *c; 532 ngx_http_cache_t *c;
533 533
534 if (!(r->method & NGX_HTTP_GET)) {
535 return NGX_DECLINED;
536 }
537
534 c = ngx_pcalloc(r->pool, sizeof(ngx_http_cache_t)); 538 c = ngx_pcalloc(r->pool, sizeof(ngx_http_cache_t));
535 if (c == NULL) { 539 if (c == NULL) {
536 return NGX_ERROR; 540 return NGX_ERROR;
537 } 541 }
538 542