I'm trying to use Nginx FastCGI caching to cache my site's home page and blog home page. However, caching doesn't seem to be working on these pages, and $upstream_cache_status always seems to be "MISS".
Site URL: http://dan.cx/
Relevant bits of the config (and the full Nginx server{} config is available at https://github.com/Daniel15/Website/blob/master/nginx.conf):
_________________________________________________
# Handles only caching certain URLs
map $uri $dan_no_cache {
default 1;
~^/bundles/ 0;
/ 0;
/blog 0;
}
...
# Caching parameters
fastcgi_cache_key "$scheme$host$request_uri";
fastcgi_cache DANIEL15;
fastcgi_cache_valid 60m;
# Don't cache if $dan_no_cache map evaluates to 1
fastcgi_cache_bypass $dan_no_cache;
fastcgi_no_cache $dan_no_cache;
# Add cache status as X-Cache header
add_header X-Cache $upstream_cache_status;
_________________________________________________
Files under /bundles/ are correctly cached (see eg. the CSS and JavaScript on the site). I've noticed that $upstream_cache_status is "BYPASS" on pages that shouldn't be cached, which makes me think it's correctly picking up those URIs as being cacheable.
What is the best way to debug this issue?
Thanks!