With sitemap enabled, update a draft post will clear all the cache of WP super c

  • With sitemap enabled, update a draft post will clear all the cache of WP super cache.

    This has annoyed me a lot in the past week.

    My WP super cache log file:

    02:39:34 18062 /wp-admin/post.php?post=380&action=edit&meta-box-loader=1&meta-box-loader-nonce=5df220bc0d&_locale=user wp_cache_post_edit: draft post, not deleting any cache files. status: draft
    02:39:34 18062 /wp-admin/post.php?post=380&action=edit&meta-box-loader=1&meta-box-loader-nonce=5df220bc0d&_locale=user wp_cache_post_change: draft post, not deleting any cache files.
    02:39:34 18062 /wp-admin/post.php?post=380&action=edit&meta-box-loader=1&meta-box-loader-nonce=5df220bc0d&_locale=user Clearing all cached files in wp_cache_clear_cache()

    This issue is gone after I disable the sitemap function. The sitemap code called wp_cache_clear_cache somewhere by Helper::clear_cache by invalidate_storage by clear_queued by the Cache_Watcher class??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    Sorry for the issue you are facing.

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Please let us know if you find the culprit.

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Looking forward to helping you.

    Hello,

    Since Rank Math caches the Sitemap, it’s needed to clear the cache whenever any new post is created or when post status is changed from draft to published. If you want to disable Sitemap cache, please add following filter code in your theme’s functions.php file:

    https://rankmath.com/kb/filters-hooks-api-developer/#enable-disable-sitemap-cache

    Setting this filter to false will prevent the cache from getting cleared whenever a post is updated.

    I hope that helps.

    The issue is when I update a draft, it will clear all the cache, which doesn’t make sense.

    Hi Zhao,

    We have to do it to make sure the sitemap is cleared from the cache and that Google sees the updates sitemap and not a cached version.

    I am not sure if there is a way to selectively clear cache but I will ask the dev. team.

    Thank you.

    Um… The problem is sitemap has nothing to do with draft post. Is it?

    Hi Zhao,

    It does. If you use any SEO plugin – you will see the same thing.

    You can disable Rank Math’s sitemap cache if you wish to prevent this from happening.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘With sitemap enabled, update a draft post will clear all the cache of WP super c’ is closed to new replies.