proxy_cache is not working

reaper nginx-forum at
Tue May 17 13:11:00 UTC 2016

It was already set but apparently wasn't being used.

location /static/ {
    try_files $uri @apache-cache;
    proxy_cache_valid 5m;

location @apache-cache {
    proxy_ignore_headers Set-Cookie Expires Cache-Control;
    proxy_hide_header Set-Cookie;


Moved this directive to second location and now it's all fine.


Posted at Nginx Forum:,266939,266942#msg-266942

More information about the nginx mailing list