Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx PageSpeed how to flush pagespeed cache?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Guilherme Jaccoud, Jul 31, 2014.

  1. Guilherme Jaccoud

    Guilherme Jaccoud Member

    63
    30
    18
    May 29, 2014
    Ratings:
    +30
    Local Time:
    3:46 PM
    how to flush the pagespeed cache?
     
  2. rdan

    rdan Premium Member Premium Member

    4,244
    1,033
    113
    May 25, 2014
    Ratings:
    +1,481
    Local Time:
    2:46 AM
    Mainline
    10.2
    I think: rm -rf /var/ngx_pagespeed_cache/*
     
  3. eva2000

    eva2000 Administrator Staff Member

    35,611
    7,842
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,089
    Local Time:
    4:46 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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
     
  4. l3est

    l3est New Member

    11
    1
    3
    Aug 1, 2018
    Ratings:
    +2
    Local Time:
    11:16 PM
    1.15.1
    MariaDB 10.1
    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?
     
  5. eva2000

    eva2000 Administrator Staff Member

    35,611
    7,842
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,089
    Local Time:
    4:46 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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
     
  6. l3est

    l3est New Member

    11
    1
    3
    Aug 1, 2018
    Ratings:
    +2
    Local Time:
    11:16 PM
    1.15.1
    MariaDB 10.1
    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');
     
    • Informative Informative x 1
  7. eva2000

    eva2000 Administrator Staff Member

    35,611
    7,842
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,089
    Local Time:
    4:46 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    interesting approach :)
     
    • Like Like x 1
..