• Resolved rubinstein

    (@rubinstein)


    Page cache ist enabled.

    Cache preload ist enabled. I use a sitemap.

    Looking at the server log files and the cache directory /home/username/public_html/wp-content/cache/page_enhanced/www.example.com/, I see the following behavior after a cache flush/when the garbage collection interval gets triggered:

    Cache preload is working, pages are generated.

    After some time, all the pages were generated.

    But then the preload command doesn’t stop. I still see preload cache GET requests in the log file.

    This doesn’t make any sense, because it causes unnecessary server load.

    Is that the expected behavior or am I doing something wrong?

    Thank you.

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

    (@vmarko)

    Hello @rubinstein,

    Thank you for your inquiry and I am happy to answer this.

    You are correct when you say that this is expected behavior.
    What the feature does is this:
    – Check the last offset
    – Check how many URLs are allowed to be processed per run
    – Fetch all URLs from sitemap (even nested sitemaps work)
    – Loop through a set of URLs to visit them
    If the end of the list is reached, it will start from the beginning in the next run.

    Do you think that adding the possibility to stop the preload after all URLs are visited would be beneficial?

    Thread Starter rubinstein

    (@rubinstein)

    Hi Marko @vmarko,

    I see, thank you for your answer.

    Is there a reason why the plugin does it that way? Because the cached pages stay the same, they’re not altered in any way.

    If there’s no benefit in doing it this way then yes, the possibility to stop the preload after all URLs are visited would be nice.

    It’s not that it adds a huge load to the server, but I see 4% or 5% CPU spikes on shared hosting.

    Thread Starter rubinstein

    (@rubinstein)

    Oh, just a thought: Maybe you could add your answer (how the preload mechanism works) to the W3 Total Cache wiki page?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rubinstein,

    Thank you for your suggestion.
    This depends on what you want to achieve. This way, we are always keeping the “warm” cache for the website visitors. Some websites change their page content often.
    I’ve added an issue in our GitHub public repo on your behalf to add the choice for users if they want to stop cache preload after all URLs are cached.
    Please check this issue regularly and track the progress.
    Once again thank you for your suggestion.
    We would really appreciate if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users. Thank you for your help!

    Thread Starter rubinstein

    (@rubinstein)

    Hi @vmarko,

    Thank you for creating an issue on GitHub.

    One more question, if I may:

    After all URLs are cached: Do the preload GET requests hit the cached pages or do they trigger any PHP?

    Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rubinstein,

    You are welcome!
    No, the preload GET requests do not hit the cached pages or trigger any PHP.
    Once again thank you for your suggestions and thank you for using W3 Total Cache.

    Thread Starter rubinstein

    (@rubinstein)

    Hi @vmarko,

    Thank you and sorry to ask again:

    So the preload GET requests get served as HTML from the page cache directory (and it doesn’t trigger any PHP)?

    Thank you and greetings from Austria to Serbia

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rubinstein,

    Yes, that is correct.
    Greetings!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Page Cache Preload doesn’t seem to stop’ is closed to new replies.