• Resolved stephla

    (@stephla)


    Hello,

    I want to clean cache of pages and re-load them.
    I use automatically prime the page cache. I configure Update interval to 60 secondes (for test) and Garbage collection interval to 60 secondes too.

    But the cache is never clean and pages never reload.
    So I tried to use plugin for cron and when I run w3_dbcache_cleanup and w3_minify_cleanup nothing happen. Cache is always the same.

    How can I resole this problem please ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @stephla

    Thank you for your inquiry and I am happy to assist you with this.
    I am not quite sure what your question is. Cache Preload, when set up properly, is using the sitemap to preload the set amount of pages E.G. 10 in a specific time period E.G. 900s
    900s is set by default and lowering to 60s can use a lot of server resources so you should leave it as it is to avoid this.
    Make sure to add the sitemap to the Sitemap URL field.
    wp_cron s not very reliable when it comes to cache priming. So it’s better to use wp-cli and also logging is available in wp-cli .
    So, instead of calling wp cron via crontab – you should call it directly via
    wp w3-total-cache pgcache_prime
    and track the output which pages/sitemap positions are primed by script
    Cache Priming will automatically create an new and fresh set of cached pages. The expired (garbage) cache will be removed with Garbage collection interval.
    Again lowering the interval can cause a lot of server resources usage and may no perform as expected.
    Thanks!

    Thread Starter stephla

    (@stephla)

    Thanks for your response.

    I have defined the sitemap.
    I don’t understand why the precache will work with cli and not work when I run the cron directly ?

    There is an other way of wp-cli ? To work with cron

    Thanks

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @stephla

    Thank you for your question.
    Simply, wp-cron is not reliable. This depends on how heavy your website is, the server condition, etc. In perfect conditions, once the page is visited, the Preload should start and start preloading pages.
    You can set up custom corn on your server to visit your website every x minutes for example:
    */10 * * * * wget -q -O - https://www.example.com/ >/dev/null 2>&1
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PreCache automatically’ is closed to new replies.