Permalink
Browse files

removed the useless http-cache related code from ngx_postgres_upstrea…

…m_finalize_request to suppress clang warnings.
  • Loading branch information...
1 parent c8aa3d3 commit 8d974d0a52ce3b43bc628b32ed94b5d7a8feeb3c @agentzh agentzh committed Aug 17, 2012
Showing with 0 additions and 28 deletions.
  1. +0 −28 src/ngx_postgres_util.c
View
28 src/ngx_postgres_util.c
@@ -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))
{

0 comments on commit 8d974d0

Please sign in to comment.