In looking over Nginx configuration for the proxy module, I do not see
an easy way to influence what is cached based on object size. I have two
use cases of interest:
Store a small file in a particular zone (e.g., SSD), and
Have a large file bypass the cache (no-store large files)
Any insight on how best to accomplish this would be greatly appreciated.
On Mon, Aug 05, 2013 at 10:28:31PM +0000, Johns, Kevin wrote:
Hi,
In looking over Nginx configuration for the proxy module, I do not see an easy
way to influence what is cached based on object size. I have two use cases of
interest:
Store a small file in a particular zone (e.g., SSD), and
Have a large file bypass the cache (no-store large files)
Any insight on how best to accomplish this would be greatly appreciated.
The proxy_no_cache with appropriate variables (e.g., map’ed or
produced with embedded perl from $upstream_http_content_length)
might be usable.
E.g. the following should disable caching of responses larger than
999 bytes or with content length not known: