• Need all pages of the website to be preloaded once every midnight. (And then only the pages, for which we hit the UPDATE button, must be re-Cached)

    Looked-up the Folder (on the Server) where the Cached files reside and found just around 5-6 folders of the pre-loaded pages.. The website has 165 pages.

    Could you advise/guide please..

Viewing 14 replies - 1 through 14 (of 14 total)
  • Are you using simple (recommended) or expert cache delivery?

    Your configuration settings will influence the behavior. It is important to note that preload is created from newest to oldest and can take quite a while to create all pages for a site with 165 pages.

    After activating Preload mode did you use the Preload Cache Now function? If not then cached pages will be generated as the pages on your site are visited.

    Thread Starter ashleyzwp

    (@ashleyzwp)

    hi. Thanks so much for ur reply.

    I’ve selected — ‘Simple (Recommended)’ for Cache Delivery Method.
    Yes, i did hit ‘Preload Cache Now’ after activating Preload mode. And the button shows ‘Cancel Cache Preload’ since.

    Its 4 hrs past the time — ‘Preload’ could’ve begun.
    (it displays the below message at the top of WP Super Cache Settings in the Preload tab:
    ‘Full refresh of cache in 19 hours 58 minutes and 2 seconds.’)
    Yet on the server, it shows just 3 folders with names of pages that are Supercached.

    Simple is php caching. Have you looked in the 5-6 folders (directories) created to see how many sub-directories have been created? You should be looking for index.php files in a directory of your page names. Depending on how you have structured your permalinks will depend on where they get stored. For example if Page2 is a child of Page1, then a folder (directory) is created for Page1 and in that directory will be a script (file) for Page1 called index.php and a directory for Page2. In the Page2 directory would also be an index.php script.

    Again there are a lot of configuration settings that influence the behavior of caching. What I have described above is my experience in using Preload with Simple caching and all default settings. However, I haven’t used Simple caching in the last few years but the basic concepts should remain the same.

    Thread Starter ashleyzwp

    (@ashleyzwp)

    Yes, each folder has just one index.php (No Subfolders).
    Today SUPERCACHE Folder showed 14 folders.

    I cleared the Cache (WP Super Cache Settings > Contents > Delete Cache)
    Hit ‘Preload Cache’.

    Message at the top:
    Preload Active
    Currently caching from post 0 to 100.
    Page last cached: 17 xxx
    (it did show 17 folders in the SUPERCACHE folder)

    It kind of appears stuck after 17.
    (over 20mins now)

    Some days ago, around 70 pages were listed, when i did “List Cached Files” (under Content)

    Enable debugging in the plugin and look through the debug log after you’ve run (or when you’re running) a preload. It will tell you a lot about what your server is doing.

    Don’t paste the debug log here as you’ll expose private information about your server.

    Thread Starter ashleyzwp

    (@ashleyzwp)

    hi. Thanks!

    Debug tab mentions the below at the start:
    Last Logged to: xxx.php (RAW)
    Username/Password: xxx

    I clicked on the ‘xxx.php’; but it led to nothing
    I thought it would ask for the password; but nothing.
    Recvd a [That page can’t be found] in the Browser.

    Today when i logged-in for updating a page (we need to update this page daily), i looked-up SuperCache folder and found 65 folders (of Preloaded Pages). After i completed my update, there was just that one folder (of the Page, i updated). Can’t figure out what’s going on..

    Thread Starter ashleyzwp

    (@ashleyzwp)

    Is there a way to instruct Preload to Cache specific Pages only

    I’ve reported this problem 5 months ago with a detailed log explaining as much as I could what’s going on. I tried again with the latest version today (1.6.2) and the issue is still the same.
    All the cache is pre generated as it should and mysteriously deleted when the preload is almost finished.
    Full description in my bug report here.
    So I’m stuck with version 1.4.9, the latest version where preloading works as it should (in my case).

    @lolobu – can you try the development version? I think I have it fixed. Download link at https://ocaoimh.ie/y/2o

    Thanks Donncha, I just tried this dev version, but sadly, I still get the very same behaviour. Near the end of the preload, I get in the log file all those:

    prune_super_cache:...
    gc: deleted...

    And so on.
    And my cache directory is nearly empty at the end, containing only for few files generated after this GC.

    @lolobu – is your homepage a static page, or is it a regular archive page of posts? The clear_post_supercache() function is deleting everything because it’s trying to delete the files associated with the post_id on the front page.

    Can you add an extra debug line to that function on your machine?
    In wp-cache.php look for “function clear_post_supercache” and on the next line add:
    wp_cache_debug( "clear_post_supercache: working on $post_id" );

    Then run the preload and see what post_id returns the URL that points at the base directory of your site. Maybe it’s a CPT even as that function only checks that the page type ISN’T a page.

    @lolobu – I updated the development version again, with this change. If the directory to be deleted is the homepage directory it skips it.

    The homepage cache is deleted at the end of preloading.

    It also adds a bunch of debugging which should help.

    @donncha – Brilliant, this time, it works!
    My homepage is not a static page, but it’s not either the classic index.php. It’s a custom front-page.php with it’s own WP_Query calls.
    This time, in the log file at the end of the preloading, I’ve got this kind of stuff (I’ve changed the path, but you’ll get the meaning)

    wp_cron_preload_cache: no more posts. scheduling next preload in 1430 minutes.
    wp_cron_preload_cache: clean expired cache files older than 85800 seconds.
    Cleaning expired cache files in /home/wp/wp-content/cache/
    Doing GC on supercache dir: /home/wp/wp-content/cache/supercache
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/bloglist-et-liens/index-https.html
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/bloglist-et-liens/index-https.html.gz
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/test4/index-https.html
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/test4/index-https.html.gz
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/kirghizstan/index-https.html
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/kirghizstan/index-https.html.gz
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/tadjikistan/index-https.html
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/tadjikistan/index-https.html.gz
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/index-https.html
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/index-https.html.gz
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/ouzbekistan/index-https.html
    prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: /home/wp/wp-content/cache/supercache/url.fr/destinations/asie-centrale/ouzbekistan/index-https.html.gz
    gc: could not delete /home/wp/wp-content/cache/supercache/index.html as it's protected.
    prune_super_cache: did not delete file: /home/wp/wp-content/cache/supercache/index.html
    gc: could not delete /home/wp/wp-content/cache/supercache/index.html as it's protected.

    The homepage is not preload, but it just doesn’t matter as far as I’m concern.
    Thanks again.

    I’m gonna play a bit more with it to check that it’s OK with the GC and all that.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘‘Preload Cache’ doesn’t seem to preload all ‘pages’’ is closed to new replies.