• Hello

    I searched but could not find a clear answer to that question:

    Can Preload feature preload custom taxonomies (WooCommerce Product categories in my case)?

    Does not seem to be the case out of the box…

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sa?a

    (@stodorovic)

    Hi @nr5149,

    There are filter wp_cache_preload_taxonomies which you can use to add custom taxonomies (product_cat in this case). I can write simple PHP code if you want.

    I’ve created issue on gitub – https://github.com/Automattic/wp-super-cache/issues/375 and I’m planning to make some improvements related to preloading.

    Regards,
    Sasa

    Thread Starter nr5149

    (@nr5149)

    Thanks for your answer.

    Yes, if it’s not too complicated, I would be nice to have a sample code for adding a taxonomy using this filter ??

    Sa?a

    (@stodorovic)

    I just updated github issue with a sample code.

    Thread Starter nr5149

    (@nr5149)

    Thank you very much. For anyone interested, note that this will preload the first page of each taxonomy archive. If ever you have some pagination, subsequent pages will not be preloaded.

    Regards

    • This reply was modified 7 years, 3 months ago by nr5149.
    Thread Starter nr5149

    (@nr5149)

    Hello

    I am getting into another issue… At some point during preload, for an unknown reason, all cache files are deleted. I have about 1500 pages to preload, and this happens around page 1000.

    I enabled logging, and below is what I found. I snipped the log with […] for more clarity and privacy. /annuaire/4-pieds/ is the last page preloaded before this “clear_post_supercache” thing happens.

    22:39:00 20020 /wp-cron.php?doing_wp_cron=[...] supercache dir: /homepages/[...]/wp-content/cache/supercache/[...]/annuaire/4-pieds/
    22:39:00 26279 /annuaire/4-pieds/ wp_cache_get_cookies_values: return:
    22:39:00 26279 /annuaire/4-pieds/ wp_cache_get_cookies_values: return:
    22:39:00 26279 /annuaire/4-pieds/ supercache dir: /homepages/[...]/wp-content/cache/supercache/[...]/annuaire/4-pieds/
    22:39:00 26279 /annuaire/4-pieds/ No Super Cache file found for current URL: /homepages/[...]/wp-content/cache/supercache/[...]/annuaire/4-pieds/index-https.html
    [...]
    22:39:02 26279 /annuaire/4-pieds/ Writing non-gzipped buffer to supercache file.
    22:39:02 26279 /annuaire/4-pieds/ Renamed temp supercache file to /homepages/[...]/wp-content/cache/supercache/[...]/annuaire/4-pieds/index-https.html
    22:39:02 26279 /annuaire/4-pieds/ Sending buffer to browser
    22:39:02 26279 /annuaire/4-pieds/ wp_cache_shutdown_callback: collecting meta data.
    22:39:02 26279 /annuaire/4-pieds/ Did not write meta file: meta-wp-cache-[...].php *1* *1* *1*
    22:39:02 20020 /wp-cron.php?doing_wp_cron=[...] wp_cron_preload_cache: fetched https://[...]/annuaire/4-pieds/
    22:39:03 20020 /wp-cron.php?doing_wp_cron=[...] supercache dir: /homepages/[...]/wp-content/cache/supercache/[...]/
    22:39:03 20020 /wp-cron.php?doing_wp_cron=[...] clear_post_supercache: deleting files in /homepages/[...]/wp-content/cache/supercache/[...]/
    22:39:03 20020 /wp-cron.php?doing_wp_cron=[...] prune_super_cache: deleted /homepages/[...]/wp-content/cache/supercache/[...]/annuaire/d/boutiques-articles-sport-grande-taille/index-https.html
    22:39:03 20020 /wp-cron.php?doing_wp_cron=[...] gc: deleted /homepages/[...]/wp-content/cache/supercache/[...]/annuaire/d/boutiques-articles-sport-grande-taille, forced delete
    [...]

    Note that on my site garbage collection is disabled (timeout set to 0) and preload mode is activated (checkbox checked).

    • This reply was modified 7 years, 3 months ago by nr5149.

    Did you get around that by any chance ? I’m running into the very same problem. Preloading used to work like a charm (until version 1.4.9), but after updating to v 1.5.9, just before the end of the preloading, almost all the preloaded files are deleted. I get this in the debug log :

    21:42:26 4005 /wp-cron.php?doing_wp_cron=[...] supercache dir: /home/[...]/wp-content/cache/supercache/[...]/
    21:42:26 4005 /wp-cron.php?doing_wp_cron=[...] clear_post_supercache: deleting files in /home/[...]/wp-content/cache/supercache/[...]/
    21:42:26 4005 /wp-cron.php?doing_wp_cron=[...] prune_super_cache: deleted /home/[...]/wp-content/cache/supercache/[...]/bloglist-et-liens/index-https.html
    21:42:26 4005 /wp-cron.php?doing_wp_cron=[...] prune_super_cache: deleted /home/[...]/wp-content/cache/supercache/[...]/bloglist-et-liens/index-https.html.gz
    21:42:26 4005 /wp-cron.php?doing_wp_cron=[...] gc: deleted /home/[...]/wp-content/cache/supercache/[...]/bloglist-et-liens, forced delete

    I end up with only a few files preloaded in the cache, 4 files (always the same) that are preloaded after the gc clearing burst.

    Thread Starter nr5149

    (@nr5149)

    Hello

    No, I found no solution. So I limited preload to about 1000 posts.

    Maybe you should write a new topic (I should have…), as this topic was not initially written for this issue.

    Ok thanks, I will.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Preload of Custom Taxonomies’ is closed to new replies.