Custom response codes and content-types for memcache module

Maxim Dounin mdounin at
Wed Aug 13 19:24:52 MSD 2008


On Wed, Aug 13, 2008 at 04:33:21PM +0200, Spil Games wrote:

>Igor, I made a new version of my memcache patch which does the 
>1) Change the internal response code for a "not found" from 404 to 503. 
>This is because we need to be able to send 404's from the cache.

This part looks plain wrong for me.  If there is no data in 
memcached - it's 404 Not Found, not 503 Service Unavailable.

Something other should be used to distinguish between 404 stored in 
memcached and 404 generated due to key not found in memcached.

>2) Scan for 'HTTP/' at the start of the memcached reponse and set the 
>status and status_line accordingly.
>3) Scan for the 'Content-Type:' header and set this header accordingly.

Why not just reuse upstream functionality as fastcgi/proxy modules 

Maxim Dounin

More information about the nginx mailing list