Skip to content

Commit 8d974d0

Browse files
committed
removed the useless http-cache related code from ngx_postgres_upstream_finalize_request to suppress clang warnings.
1 parent c8aa3d3 commit 8d974d0

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

src/ngx_postgres_util.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -120,34 +120,6 @@ ngx_postgres_upstream_finalize_request(ngx_http_request_t *r,
120120
u->pipe->temp_file->file.fd);
121121
}
122122

123-
#if (NGX_HTTP_CACHE)
124-
125-
if (u->cacheable && r->cache) {
126-
time_t valid;
127-
128-
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
129-
"http upstream cache fd: %d",
130-
r->cache->file.fd);
131-
132-
if (rc == NGX_HTTP_BAD_GATEWAY || rc == NGX_HTTP_GATEWAY_TIME_OUT) {
133-
134-
valid = ngx_http_file_cache_valid(u->conf->cache_valid, rc);
135-
136-
if (valid) {
137-
r->cache->valid_sec = ngx_time() + valid;
138-
r->cache->error = rc;
139-
}
140-
}
141-
142-
# if defined(nginx_version) && (nginx_version >= 8047)
143-
ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
144-
# else
145-
ngx_http_file_cache_free(r, u->pipe->temp_file);
146-
# endif
147-
}
148-
149-
#endif
150-
151123
if (u->header_sent
152124
&& (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE))
153125
{

0 commit comments

Comments
 (0)