Support » Plugin: PageSpeed Ninja » How to autoclean static file cache folder “/s”

  • teentitan


    under site root PSN creates a folder called “/s” by default to store static files (.js and .gz)
    PSN cron clean automatically all cache folders like

    but this folder /s continues to grow (now is 4G) and I don’t know when and how it will be automatically pourged by old files. Can you help me?

    • This topic was modified 10 months ago by teentitan.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Denis Ryabov


    Try to set Caching time-to-live (see “Reduce server response time” section in the Advanced settings tab) to 1 minute, remove wp-content/plugins/psn-pagespeed-ninja/cache/filecachecleaner.stamp file, and then clear cache again. For safety, PSN keeps files /s directory for 2x of “Caching time-to-live” time.



    Done, but /s is not purged
    These folders are correctly purged

    This is my “Reduce server response time” setting
    Caching on
    Experimental Caching on
    Caching time-to-live 1 min
    DNS Prefetch on

    I’ve read all threads about this issue but no one has solved.
    PSN is awesome but I need to purge old files in “/s” because the full disk risk.
    How can I solve?
    Can I delete files older than a date with a cron bash script?
    For example I could get the date of the oldest file in wp-content/plugins/psn-pagespeed-ninja/cache, I saw it is the same in wp-content/plugins/psn-pagespeed-ninja/ress/cache and delete all files older than this date in /s folder. Would that work?

    Plugin Author Denis Ryabov


    Hmm, do you have error messages in the error_log file that may be related to PSN?

    Yes, you can safely delete files in /s dated older than time of the last PSN’s cache clearing. To be sure, clear cache again after this operation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to autoclean static file cache folder “/s”’ is closed to new replies.