Welcome! Log In Create A New Profile

Advanced

[PATCH 1 of 2] Cache: remove unused valid_msec fields

Piotr Sikora
November 18, 2014 08:18PM
# HG changeset patch
# User Piotr Sikora <piotr@cloudflare.com>
# Date 1416359233 28800
# Tue Nov 18 17:07:13 2014 -0800
# Node ID 99e65578bc80960b2fdf494e048678dd97bba029
# Parent 2f7e557eab5b501ba71418febd3de9ef1c0ab4f1
Cache: remove unused valid_msec fields.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>

diff -r 2f7e557eab5b -r 99e65578bc80 src/http/ngx_http_cache.h
--- a/src/http/ngx_http_cache.h Tue Nov 18 20:41:12 2014 +0300
+++ b/src/http/ngx_http_cache.h Tue Nov 18 17:07:13 2014 -0800
@@ -27,7 +27,7 @@
#define NGX_HTTP_CACHE_ETAG_LEN 42
#define NGX_HTTP_CACHE_VARY_LEN 42

-#define NGX_HTTP_CACHE_VERSION 3
+#define NGX_HTTP_CACHE_VERSION 4


typedef struct {
@@ -45,7 +45,6 @@ typedef struct {

unsigned count:20;
unsigned uses:10;
- unsigned valid_msec:10;
unsigned error:10;
unsigned exists:1;
unsigned updating:1;
@@ -84,7 +83,6 @@ struct ngx_http_cache_s {

ngx_uint_t min_uses;
ngx_uint_t error;
- ngx_uint_t valid_msec;

ngx_buf_t *buf;

@@ -116,7 +114,6 @@ typedef struct {
time_t last_modified;
time_t date;
uint32_t crc32;
- u_short valid_msec;
u_short header_start;
u_short body_start;
u_char etag_len;
diff -r 2f7e557eab5b -r 99e65578bc80 src/http/ngx_http_file_cache.c
--- a/src/http/ngx_http_file_cache.c Tue Nov 18 20:41:12 2014 +0300
+++ b/src/http/ngx_http_file_cache.c Tue Nov 18 17:07:13 2014 -0800
@@ -561,7 +561,6 @@ ngx_http_file_cache_read(ngx_http_reques
c->valid_sec = h->valid_sec;
c->last_modified = h->last_modified;
c->date = h->date;
- c->valid_msec = h->valid_msec;
c->header_start = h->header_start;
c->body_start = h->body_start;
c->etag.len = h->etag_len;
@@ -762,7 +761,6 @@ renew:

rc = NGX_DECLINED;

- fcn->valid_msec = 0;
fcn->error = 0;
fcn->exists = 0;
fcn->valid_sec = 0;
@@ -1119,7 +1117,6 @@ ngx_http_file_cache_set_header(ngx_http_
h->last_modified = c->last_modified;
h->date = c->date;
h->crc32 = c->crc32;
- h->valid_msec = (u_short) c->valid_msec;
h->header_start = (u_short) c->header_start;
h->body_start = (u_short) c->body_start;

@@ -1359,7 +1356,6 @@ ngx_http_file_cache_update_header(ngx_ht
h.last_modified = c->last_modified;
h.date = c->date;
h.crc32 = c->crc32;
- h.valid_msec = (u_short) c->valid_msec;
h.header_start = (u_short) c->header_start;
h.body_start = (u_short) c->body_start;

@@ -1475,7 +1471,6 @@ ngx_http_file_cache_free(ngx_http_cache_

if (c->valid_sec) {
fcn->valid_sec = c->valid_sec;
- fcn->valid_msec = c->valid_msec;
}

} else if (!fcn->exists && fcn->count == 0 && c->min_uses == 1) {

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

[PATCH 1 of 2] Cache: remove unused valid_msec fields

Piotr Sikora 905 November 18, 2014 08:18PM

[PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Piotr Sikora 418 November 18, 2014 08:18PM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Maxim Dounin 441 November 19, 2014 11:40AM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Piotr Sikora 509 November 19, 2014 04:54PM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Maxim Dounin 486 November 20, 2014 11:40AM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Piotr Sikora 398 November 23, 2014 06:46AM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

steveh 576 November 23, 2014 07:34AM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Maxim Dounin 425 November 24, 2014 10:06AM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Piotr Sikora 438 November 24, 2014 05:42PM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Maxim Dounin 1004 November 25, 2014 08:44AM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Piotr Sikora 493 November 25, 2014 08:16PM

Re: [PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Maxim Dounin 453 November 26, 2014 09:56AM

[PATCH] Cache: send conditional requests only for cached 200/206 responses

Piotr Sikora 423 November 25, 2014 08:42PM

Re: [PATCH] Cache: send conditional requests only for cached 200/206 responses

Maxim Dounin 413 November 26, 2014 09:56AM

[PATCH] Cache: send conditional requests only for cached 200/206 responses

Piotr Sikora 445 November 26, 2014 09:40PM

Re: [PATCH] Cache: send conditional requests only for cached 200/206 responses

Maxim Dounin 507 December 04, 2014 01:16PM

Re: [PATCH 1 of 2] Cache: remove unused valid_msec fields

Maxim Dounin 441 November 19, 2014 11:46AM

Re: [PATCH 1 of 2] Cache: remove unused valid_msec fields

Piotr Sikora 467 November 19, 2014 04:08PM

Re: [PATCH 1 of 2] Cache: remove unused valid_msec fields

Maxim Dounin 435 November 20, 2014 11:16AM

Re: [PATCH 1 of 2] Cache: remove unused valid_msec fields

Piotr Sikora 448 November 25, 2014 08:16PM



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

Online Users

Guests: 281
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready