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

  • teentitan

    (@teentitan)


    Hi,
    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
    wp-content/plugins/psn-pagespeed-ninja/cache
    wp-content/plugins/psn-pagespeed-ninja/ress

    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

    (@dryabov)

    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.

    teentitan

    (@teentitan)

    Done, but /s is not purged
    These folders are correctly purged
    wp-content/plugins/psn-pagespeed-ninja/cache
    wp-content/plugins/psn-pagespeed-ninja/ress/cache

    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

    (@dryabov)

    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.