• Resolved josephhh

    (@joseribeiro)


    Hello,

    I’ve ran preload manually and set it to run every 1440m

    I’ve checked disable garbage collection.

    After I ran the preload all pages were cached as expected. But after some time cache is not being shown anymore. Isn´t the goal of preloading to rebuild the cache automatically for every page after some time (1 day in my example) in a way that there’s always a cached version of every page available instead of users having to rebuild the cache by visiting the website’s pages?

    Thank you

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support Josh (a11n)

    (@vitkory)

    Howdy @joseribeiro – we believe that your expectations are correct. Here’s what we recommend:

    • Enable preload mode on the Preload settings page if you haven’t yet.
    • Install WP Control and look for the wp_cache_full_preload_hook event after a preload has finished. This is the event that starts a new preload.

    When Preload Mode is enabled, this stops garbage collection. If someone leaves a comment on a block post, the plugin will delete the cached files for that post. Another visitor coming to that post afterwards will generate a new cached page.

    Let us know how this works for you!

    Thread Starter josephhh

    (@joseribeiro)

    Hi @vitkory ,

    I did enable preload mode and I’ve installed WP Control now… but to be honest I’m not getting what’s the purpose.

    I see the event schedulled to run there.

    But cache is still being cleaned. At the moment if I go to the contents section of WP Super Cache I see that there are 0 cached pages.

    Site is under development, therefore no one is leaving any comment.

    Thank you

    • This reply was modified 1 year, 3 months ago by josephhh.

    @joseribeiro “preload mode” is supposed to stop garbage collection from running, or at least, from deleting any files.

    The next thing I would do is enable the email feature in garbage collection. That will email you when it runs so you can check if it deletes any files.

    Since your site hasn’t launched yet, you could enable debug mode. Go to the Debug tab and enable it there. The logs should show you when cached files are deleted. There is a small chance the debug log viewer script is deleted by the garbage collection too, due to a small bug, but you can download the log file itself from the cache folder to your computer to look at it in a text editor.

    Thread Starter josephhh

    (@joseribeiro)

    Hello,

    Garbage collection emails always show 0 directories/files deleted.

    What exactly should I look for in the log?

    I suspect files are deleted due to editing, because I always had cache during the weekend, when I did not work on the website. However, I’ve already disabled the option to delete all files when one page is updated (altough, if I understand this right, that is not expected to happen once preload is on).

    Also, when preload runs, homepage doesn´t seem to get cached.

    Thank you

    Thread Starter josephhh

    (@joseribeiro)

    also,the preload is taking 5 hours to cache 60 pages! (at least that’s the time between preload start and finish emails I get)

    Merry Christmas, if you celebrate.

    Plugin Contributor Adnan Haque (a11n)

    (@adnan007)

    Hi @joseribeiro!

    Merry Christmas and Happy New Year! Can you please try enabling the cache debug logs and see if that gives any clues? Here is how to enable it.

    @joseribeiro – In the debug log you’ll see messages saying that the cache files are being deleted, and hopefully, it’ll be after some event. That event might be triggered by some plugin you have installed, for example.

    also,the preload is taking 5 hours to cache 60 pages! (at least that’s the time between preload start and finish emails I get)

    This might be because it’s a development server and nobody is visiting the site to start the WP Cron jobs running. That shouldn’t be a problem with a production site.

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hey @joseribeiro,

    Do you have updates about that, do you still need help? We usually close inactive threads after one week of no movement, but we want to make sure we’re all set before marking it as solved. Thanks!

    Thread Starter josephhh

    (@joseribeiro)

    Hello again and thanks for the support.

    I have enabled logging but when I click the “currently loggin to” link, nothing happens. It just shows a blank page, no login area.

    Cache is still being deleted at some point, altough all emails from garbage collection saying that no files/directories are being deleted.

    Can you have a look at my configuration. I think everything is a it should, but…

    Thank you

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi there, @joseribeiro,

    When you enable the logging, you should indeed land on a blank page with the login little window to access the WP Super Cache Log Viewer, so it’s not expected behaviour that you don’t see the login window.

    This could happen when you attempted to access it too many times in a short timeframe, or due to a possible plugin conflict. Can you please temporarily deactivate all your plugins (but keep WP Super Cache enabled) and check if you can login to the Cache Log Viewer page? If it works, then reactivate each plugin one by one to find out which one is causing problems.

    In case it won’t help, we’ll reach out to our developers. Thanks for working this out with us!

    Thread Starter josephhh

    (@joseribeiro)

    Hello,

    Not sure what happened but now when clicking the url the login window does appear.

    But I don´t know what to look for. Searched for “deleted and found instances of “GC Flag Deleted” and prune_super_cache: deleted ABSPATH/wp-content/cache/supercache/… nothing else. There’s also instances of “cleaning expired”…

    thanks

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi there, @joseribeiro,

    I wonder if there no cache to show logs on if everything has been cleared out. It may happen that you don’t find any data on the logs if the cache has been cleared.
    Maybe this reading can help you when you get data in the logs: https://jetpack.com/support/wp-super-cache/enabling-the-debug-mode/#reading-the-debug-log

    Thread Starter josephhh

    (@joseribeiro)

    Hi,

    I’ve looked at the log but t<span style=”box-sizing: border-box; margin: 0px; padding: 0px;”>his is hard for me as I’m not a developer. What exactly should I see in the log indicating that the files are being cleaned? All I can say at the moment is t</span>hat at some point, pages take too long to load because cache is not being presented anymore and that will be a problem as soon as the website is finished.

    thank you

    I suspect files are deleted due to editing, because I always had cache during the weekend, when I did not work on the website. However, I’ve already disabled the option to delete all files when one page is updated (altough, if I understand this right, that is not expected to happen once preload is on).

    This is probably why your cache files are being deleted. If you’re editing posts, changing the theme or doing other actions that will clear out some or all of the cache files.

    When you edit a post, you’ll see something like this in the debug log (X is the post_id)

    wp_cache_post_edit: Clearing cache for post X on clean_post_cache
    Post change: supercache enabled: deleting cache files in ABSPATH/wp-content/cache/supercache/example.com/
    wpsc_delete_files: deleting ABSPATH/wp-content/cache/supercache/example.com//category/uncategorized/

    When you access a page, if you’re logged in (and caching is enabled for logged in visitors) you’ll see something like this when the file is generated:

    11:14:39 1539067 /test/ wpsc_is_caching_user_disabled: false
    11:14:39 1539067 /test/ ACCEPT: text/html
    11:14:39 1539067 /test/ wp_cache_get_cookies_values: Login/postpass cookie detected
    11:14:39 1539067 /test/ wp_cache_get_cookies_values: return: 1234568bbe0cf9577613729ccf207dd
    11:14:39 1539067 /test/ supercache dir: ABSPATH/wp-content/cache/supercache/example.com/test/
    11:14:39 1539067 /test/ No Super Cache file found for current URL: ABSPATH/wp-content/cache/supercache/example.com/test/index-https.html
    11:14:39 1539067 /test/ wp_cache_get_cookies_values: cached: 1234568bbe0cf9577613729ccf207dd
    11:14:39 1539067 /test/ In WP Cache Phase 2
    11:14:39 1539067 /test/ Setting up WordPress actions
    11:14:39 1539067 /test/ Created output buffer
    11:14:39 1539067 /test/ wp_cache_get_cookies_values: cached: 1234568bbe0cf9577613729ccf207dd
    11:14:39 1539067 /test/ wpsc_is_caching_user_disabled: false
    11:14:39 1539067 /test/ Output buffer callback
    11:14:39 1539067 /test/ wp_cache_get_cookies_values: cached: 1234568bbe0cf9577613729ccf207dd
    11:14:39 1539067 /test/ wpsc_is_caching_user_disabled: false
    11:14:39 1539067 /test/ Writing non-gzipped buffer to wp-cache cache file.
    11:14:39 1539067 /test/ Renamed temp wp-cache file to ABSPATH/wp-content/cache/supercache/example.com/test/wp-cache-1234510f2f478f49b264e3abe6cb900.php
    11:14:39 1539067 /test/ Sending buffer to browser
    11:14:39 1539067 /test/ wp_cache_shutdown_callback: collecting meta data.
    11:14:39 1539067 /test/ Writing meta file: ABSPATH/wp-content/cache/supercache/example.com/test/meta-wp-cache-1234510f2f478f49b264e3abe6cb900.php

    When a cache file already exists, you’ll see something like this:

    11:22:55 1539189 /test/ wpsc_is_caching_user_disabled: false
    11:22:55 1539189 /test/ ACCEPT: text/html
    11:22:55 1539189 /test/ wp_cache_get_cookies_values: Login/postpass cookie detected
    11:22:55 1539189 /test/ wp_cache_get_cookies_values: return: 1234568bbe0cf9577613729ccf207dd
    11:22:55 1539189 /test/ supercache dir: ABSPATH/wp-content/cache/supercache/example.com/test/
    11:22:55 1539189 /test/ wp-cache file exists: ABSPATH/wp-content/cache/supercache/example.com/test/wp-cache-1234510f2f478f49b264e3abe6cb900.php
    11:22:55 1539189 /test/ Sending Header: Vary: Accept-Encoding, Cookie
    11:22:55 1539189 /test/ Sending Header: Expires: Wed, 11 Jan 1984 05:00:00 GMT
    11:22:55 1539189 /test/ Sending Header: Cache-Control: no-cache, must-revalidate, max-age=0, no-store, private
    11:22:55 1539189 /test/ Sending Header: Content-Type: text/html; charset=UTF-8
    11:22:55 1539189 /test/ Sending Header: X-Pingback: https://example.com/test/xmlrpc.php
    11:22:55 1539189 /test/ Sending Header: Link: https://example.com/test/wp-json/; rel=”https://api.w.org/&#8221;, https://example.com/test/wp-json/wp/v2/posts/X; rel=”alternate”; title=”JSON”; type=”application/json”, https://example.com/test/?p=X; rel=shortlink
    11:22:55 1539189 /test/ Sending already uncompressed cache file from wp-cache to browser: ABSPATH/wp-content/cache/supercache/example.com/test/wp-cache-1234510f2f478f49b264e3abe6cb900.php
    11:22:55 1539189 /test/ exit request:

    If your site takes too long to serve a page when it’s under development (and it’s not getting any traffic), you probably need to use memcached or find out why the page is taking so long to load. Maybe some plugin is using long queries or performs badly in some way. Full page caching plugins like WP Super Cache, can hide this to some extent, but it’s not ideal.

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hey there, @joseribeiro,

    Hope the past answers served you well. We usually close inactive threads after one week of no movement, and we want to make sure we’re all set before marking it as solved. Let us know if you have further doubts. Thanks!

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

The topic ‘Preload’ is closed to new replies.