# Prevent nginx caching empty pages?

**URL:** <https://www.ruby-forum.com/t/prevent-nginx-caching-empty-pages/235921>\
**Category:** NGINX\
**Created:** [July 24, 2013, 2:25pm UTC](https://www.ruby-forum.com/t/prevent-nginx-caching-empty-pages/235921 "2013-07-24T14:25:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 24, 2013, 2:25pm UTC](https://www.ruby-forum.com/t/prevent-nginx-caching-empty-pages/235921/1 "2013-07-24T14:25:49Z")

</div>

Hi,

I’m trying to diagnose a problem we have on a rather complex system with  
an nginx acting as a remote proxy server, where what appears to be a  
completely empty response is being returned, seemingly from the nginx  
cache. It’s early days yet in my troubleshooting, so this may not  
actually be the problem, but just in case, I have two questions:

1. Is this actually possible? Will nginx actually cache an empty  
response? (I am not sure how an empty response could actually come from  
the back end without being marked with some kind of error response  
header, which would presumably prevent any caching, but that’s a  
different issue).

2. If it is possible, is there any way to prevent it from happening?  
E.g., setting some kind of minimal cachable size for the cache? This is  
using the now rather ancient version 0.7.65, I’m afraid.

John M
