how to flush the pagespeed cache?
yeah that's how I do it @Guilherme Jaccoud Code: rm -rf /var/ngx_pagespeed_cache/* ngxrestart official way according to docs is at PageSpeed System Integration - PageSpeed Module — Google Developers so for Centmin Mod ngx_pagespeed Code: touch /var/ngx_pagespeed_cache/cache.flush
is there any way to reset this cache from wordpress dashboard or reset it automatically on file changes (css and javascript files), or disable cache for these file types?
not exactly.. when files change, ngx_pagespeed will update the cache automatically/eventually but to reset/clear cache, only 2 ways are what you quoted
cache update didn't work for me. I've added this to w3 total cache purge hook to reset ngx_pagespeed cache, now it works: Code: shell_exec('touch /var/ngx_pagespeed_cache/cache.flush');
Code: $out = shell_exec("/scripts/rsync.sh 2>&1"); echo $out; I have problem exec scripts, because scripts is nginx user and script need rsync to root
? your rsync.sh script is trying to sync root user owned files but php is run by nginx ? Then you're using wrong script/language (php) to trigger rsync.sh. You'd need to run rsync.sh via root user maybe a cronjob or something ?