Skip to content

Commit

Permalink
removed the useless http-cache related code from ngx_postgres_upstrea…
Browse files Browse the repository at this point in the history
…m_finalize_request to suppress clang warnings.
  • Loading branch information
agentzh committed Aug 17, 2012
1 parent c8aa3d3 commit 8d974d0
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/ngx_postgres_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,34 +120,6 @@ ngx_postgres_upstream_finalize_request(ngx_http_request_t *r,
u->pipe->temp_file->file.fd);
}

#if (NGX_HTTP_CACHE)

if (u->cacheable && r->cache) {
time_t valid;

ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http upstream cache fd: %d",
r->cache->file.fd);

if (rc == NGX_HTTP_BAD_GATEWAY || rc == NGX_HTTP_GATEWAY_TIME_OUT) {

valid = ngx_http_file_cache_valid(u->conf->cache_valid, rc);

if (valid) {
r->cache->valid_sec = ngx_time() + valid;
r->cache->error = rc;
}
}

# if defined(nginx_version) && (nginx_version >= 8047)
ngx_http_file_cache_free(r->cache, u->pipe->temp_file);
# else
ngx_http_file_cache_free(r, u->pipe->temp_file);
# endif
}

#endif

if (u->header_sent
&& (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE))
{
Expand Down

0 comments on commit 8d974d0

Please sign in to comment.