• Resolved janvitos

    (@janvitos)


    Hi,

    Thanks for this awesome plugin.

    I noticed today that there is a bug when Nginx Helper tries to clear the cache for the post sitemaps.

    This is what I get in the Nginx Helper log for the various post sitemaps:

    Purging URL | https://www.website.com44:17-04:00
    Purging URL | https://www.website.com07:10-04:00
    Purging URL | https://www.website.com50:25-04:00

    The URLs should look like this:

    Purging URL | https://www.website.com/sitemap-posttype-post.2022.xml
    Purging URL | https://www.website.com/sitemap-posttype-post.2021.xml
    Purging URL | https://www.website.com/sitemap-posttype-post.2020.xml

    It seems the issue is most probably related to the xmlsf_get_index_archive_data function.

    I can assist if you need help debugging / testing.

    Thank you.

    • This topic was modified 2 years, 9 months ago by janvitos.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter janvitos

    (@janvitos)

    So I found a temporary fix.

    Line 173 in /xml-sitemap-feed/models/functions.shared.php, change:

    foreach ( xmlsf_get_index_archive_data( $post_type, $archive ) as $url ) {

    To:

    foreach ( xmlsf_get_index_archive_data( $post_type, $archive ) as $url => $lastmod ) {

    Now, the proper post sitemap URLs are cleared from the cache.

    • This reply was modified 2 years, 9 months ago by janvitos.
    Thread Starter janvitos

    (@janvitos)

    By the way, it is such a nice feature to have integrated your plugin with Nginx Helper. Now I can safely cache feeds and sitemaps with Fastcgi Cache and there is very little load on the server.

    Hi @janvitos, thanks for sharing your patch ??

    The issue is known and has been fixed in the development version. Until it is released, your patch will do the trick!

    Thread Starter janvitos

    (@janvitos)

    Awesome, thanks!

    Thread Starter janvitos

    (@janvitos)

    Resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug when plugin clears Nginx Helper post sitemap cache’ is closed to new replies.