In order to solve this issue http://forum.nginx.org/read.php?2,255421,255438#msg-255438 two additional features would be cool:
Syntax: proxy_cache_min_size number; Default: proxy_cache_min_size 1; Context: http, server, location
Sets the minimal size in bytes for a response to be cached.
Syntax: proxy_cache_max_size number; Default: proxy_cache_max_size —; Context: http, server, location
Sets the maximal size in bytes for a response to be cached.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,258604,258604#msg-258604
I also encountered the same problem, but after 4 years, this feature has not been added to the latest version.
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,258604,285566#msg-285566