I’ve configured nginx to cache only /piwik/piwik.php since that file is accessed so frequently. I’m getting “X-Cache: HIT” so I know it’s working. Any suggestions for improvement?
fastcgi_cache_path /var/cache/php-fpm levels=1:2 keys_zone=piwik:10m;
fastcgi_cache_key “$scheme$request_method$host$request_uri”;
location /piwik/piwik.php {
fastcgi_cache piwik;
add_header X-Cache $upstream_cache_status;
fastcgi_pass unix:/run/php-fpm.socket;
include fastcgi.conf;
}
This page seems to reference a built-in tracker cache:
http://lists.piwik.org/pipermail/piwik-git/2013-February/000137.html
Is that an alternative to configuring the cache in nginx?