Welcome! Log In Create A New Profile

Advanced

[PATCH 1 of 5] Cache: obsolete code removed

Maxim Dounin
December 11, 2011 10:06AM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1323366109 -10800
# Node ID 64e354fb95e4ea72f479213ee4e8b4274413ce4f
# Parent 8c96af2112c18a20e6206edb1e71998358ceeccb
Cache: obsolete code removed.

The ngx_http_cache() and ngx_http_no_cache_set_slot() functions were replaced
by ngx_http_test_predicates() and ngx_http_set_predicate_slot() in 0.8.46 and
no longer used since then.

diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -1752,69 +1752,3 @@ ngx_http_file_cache_valid_set_slot(ngx_c

return NGX_CONF_OK;
}
-
-
-ngx_int_t
-ngx_http_cache(ngx_http_request_t *r, ngx_array_t *no_cache)
-{
- ngx_str_t val;
- ngx_uint_t i;
- ngx_http_complex_value_t *cv;
-
- cv = no_cache->elts;
-
- for (i = 0; i < no_cache->nelts; i++) {
- if (ngx_http_complex_value(r, &cv[i], &val) != NGX_OK) {
- return NGX_ERROR;
- }
-
- if (val.len && val.data[0] != '0') {
- return NGX_DECLINED;
- }
- }
-
- return NGX_OK;
-}
-
-
-char *
-ngx_http_no_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
-{
- char *p = conf;
-
- ngx_str_t *value;
- ngx_uint_t i;
- ngx_array_t **a;
- ngx_http_complex_value_t *cv;
- ngx_http_compile_complex_value_t ccv;
-
- a = (ngx_array_t **) (p + cmd->offset);
-
- if (*a == NGX_CONF_UNSET_PTR) {
- *a = ngx_array_create(cf->pool, 1, sizeof(ngx_http_complex_value_t));
- if (*a == NULL) {
- return NGX_CONF_ERROR;
- }
- }
-
- value = cf->args->elts;
-
- for (i = 1; i < cf->args->nelts; i++) {
- cv = ngx_array_push(*a);
- if (cv == NULL) {
- return NGX_CONF_ERROR;
- }
-
- ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
-
- ccv.cf = cf;
- ccv.value = &value[i];
- ccv.complex_value = cv;
-
- if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
- return NGX_CONF_ERROR;
- }
- }
-
- return NGX_CONF_OK;
-}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 5] cache patches

Maxim Dounin 1798 December 11, 2011 10:06AM

[PATCH 1 of 5] Cache: obsolete code removed

Maxim Dounin 723 December 11, 2011 10:06AM

[PATCH 2 of 5] Cache: handling of cache files with long headers

Maxim Dounin 906 December 11, 2011 10:06AM

[PATCH 3 of 5] Cache: only complain on long locked entries

Maxim Dounin 909 December 11, 2011 10:06AM

[PATCH 4 of 5] Cache locks initial implementation

Maxim Dounin 873 December 11, 2011 10:06AM

[PATCH 5 of 5] Cache lock support for fastcgi, scgi, uwsgi

Maxim Dounin 723 December 11, 2011 10:08AM

Re: [PATCH 0 of 5] cache patches

fanboy 983 December 11, 2011 07:00PM

Re: [PATCH 0 of 5] cache patches

Maxim Dounin 780 December 12, 2011 04:54AM

Re: [PATCH 0 of 5] cache patches

António P. P. Almeida 758 December 11, 2011 07:10PM

Re: [PATCH 0 of 5] cache patches

Maxim Dounin 733 December 12, 2011 05:02AM

Re: [PATCH 0 of 5] cache patches

António P. P. Almeida 709 December 12, 2011 05:28AM

Re: [PATCH 0 of 5] cache patches

Maxim Dounin 766 December 12, 2011 05:36AM

Re: [PATCH 0 of 5] cache patches

António P. P. Almeida 1032 December 13, 2011 02:42PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 112
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready