Thanks agentzh. The Lua code you gave works and does what I need here. Still would be great to have an option like ... [code] proxy_cache_bypass_empty $var; proxy_no_cache_empty $var; [/code] ... in the main proxy module though. Anyway, solved at least. Thanks again. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,161969,168015#msg-168015