Nginx Caching max-age=0 -


i believe caching on nginx server set correctly on header when checking in firebug seeing 'cache-control:max-age=0'.

i assuming means cache not working correctly. ideas?

edit 29/10/15: server set smart static files processing , seve static files directly nginx. here additional directives being used.

# begin w3tc minify cache location ~ /wp-content/cache/minify.*\.js$ { types {} default_type application/x-javascript; add_header vary "accept-encoding"; add_header pragma public; add_header cache-control "public, must-revalidate, proxy-revalidate"; expires 30d; } location ~ /wp-content/cache/minify.*\.css$ { types {} default_type text/css; add_header vary "accept-encoding"; add_header pragma public; add_header cache-control "public, must-revalidate, proxy-revalidate"; expires 30d; } location ~ /wp-content/cache/minify.*js\.gzip$ { gzip off; types {} default_type application/x-javascript; add_header vary "accept-encoding"; add_header content-encoding gzip; } location ~ /wp-content/cache/minify.*css\.gzip$ { gzip off; types {} default_type text/css; add_header vary "accept-encoding"; add_header content-encoding gzip; } # end w3tc minify cache # begin w3tc minify core rewrite ^/wp-content/cache/minify.*/w3tc_rewrite_test$ /wp-content   /plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1 last; set $w3tc_enc ""; if ($http_accept_encoding ~ gzip) { set $w3tc_enc .gzip; } if (-f $request_filename$w3tc_enc) { rewrite (.*) $1$w3tc_enc break; } rewrite ^/wp-content/cache/minify/(.+/[x]+\.css)$ /wp-content/plugins    /w3-total-cache/pub/minify.php?test_file=$1 last; rewrite ^/wp-content/cache/minify/(.+\.(css|js))$ /wp-content/plugins    /w3-total-cache/pub/minify.php?file=$1 last; # end w3tc minify core location ~* \.(js|css|svg|png|jpg|jpeg|gif|ico)$ { expires 30d; add_header pragma public; add_header cache-control "public, must-revalidate, proxy-revalidate"; log_not_found off; access_log off; } 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -