Welcome! Log In Create A New Profile

Advanced

Caching 0-byte 200 Status Responses

Posted by adamchal 
Caching 0-byte 200 Status Responses
January 03, 2012 02:00PM
I have a problem with Nginx's cache when an upstream returns a 0-byte 200 response. These 0-byte responses are very rare, but they are really apparent when the 0-byte 200 response gets cached for 1 hour.

With Nginx, you're able to set different TTLs for specific response codes, but I cannot figure out a way to set a really low TTL for a 0-byte 200 response or treat it like a 500 status code. Again, I'm trying to figure out why I'm getting the occasional 0-byte 200 response in my applications, but until then, it would be nice to have the ability to treat a 0-byte 200 status code response as a 500 error and not cache it.

Anybody have any experience with this?

Adam
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 185
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready