• Resolved emilycestmoi

    (@emilycestmoi)


    Yoast is excessively clearing my caches on my website. This happens every time an administrator logs in after a set period of time. When the cache is cleared by Yoast my site will timeout due to the large cache my site maintains. There is no need to clear the cache here.

    The issue is related to the option “last_known_no_unindexed” being updated on the “admin_init” action. This option update triggers a call to “WPSEO_Utils::clear_cache” as it is setup to filter on WP option changes. This call to clear_cache will then call my WP Super Cache function “wp_cache_clear_cache()” and trigger the whole cascade, locking my site.

    elseif ( function_exists( 'wp_cache_clear_cache' ) ) {
         wp_cache_clear_cache();
    }

    Please correct this issue as I have to manually patch this broken functionality in your plugin for my site.

    Most people will not notice this issue because their cache is small, which is probably why it has not been reported. This issue would have been introduced within the last few months, I noticed it a while ago but have just finally had the time today to track it down.

    A full stacktrace of Yoast clearing the cache on admin login is below:

    #0 /drive/www/emmywatch/wp-content/plugins/autoptimize/classes/autoptimizeCache.php(451): autoptimizeCache::clearall(false)
    #1 /drive/www/emmywatch/wp-includes/class-wp-hook.php(308): autoptimizeCache::clearall_actionless('')
    #0 /drive/www/emmywatch/wp-content/plugins/autoptimize/classes/autoptimizeCache.php(451): autoptimizeCache::clearall(false)
    #1 /drive/www/emmywatch/wp-includes/class-wp-hook.php(308): autoptimizeCache::clearall_actionless('')
    #2 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #3 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /drive/www/emmywatch/wp-content/plugins/wp-super-cache/wp-cache-phase2.php(2975): do_action('...')
    #5 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/inc/class-wpseo-utils.php(421): wp_cache_clear_cache()
    #6 /drive/www/emmywatch/wp-includes/class-wp-hook.php(310): WPSEO_Utils::clear_cache(Array)
    #7 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #8 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #9 /drive/www/emmywatch/wp-includes/option.php(570): do_action('...', Array, Array, '...')
    #10 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(507): update_option('...', Array)
    #11 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(311): WPSEO_Options::save_option('...', '...', Array)
    #12 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/helpers/options-helper.php(37): WPSEO_Options::set('...', Array)
    #13 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/analytics/user-interface/last-completed-indexation-integration.php(61): Yoast\WP\SEO\Helpers\Options_Helper->set('...', Array)
    #14 /drive/www/emmywatch/wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Analytics\User_Interface\Last_Completed_Indexation_Integration->maybe_set_indexables_unindexed_calculated('...', 0)
    #15 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #16 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #17 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/actions/indexing/abstract-indexing-action.php(98): do_action('...', '...', '...')
    #18 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/actions/indexing/abstract-link-indexing-action.php(89): Yoast\WP\SEO\Actions\Indexing\Abstract_Indexing_Action->get_total_unindexed()
    #19 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/helpers/indexing-helper.php(318): Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_limited_unindexed_count(26)
    #20 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/helpers/indexing-helper.php(335): Yoast\WP\SEO\Helpers\Indexing_Helper->get_limited_unindexed_count(25)
    #21 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/integrations/admin/background-indexing-integration.php(181): Yoast\WP\SEO\Helpers\Indexing_Helper->get_limited_filtered_unindexed_count(25)
    #22 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/integrations/admin/background-indexing-integration.php(139): Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->should_index_on_shutdown(25)
    #23 /drive/www/emmywatch/wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->register_shutdown_indexing('')
    #24 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #25 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #26 /drive/www/emmywatch/wp-admin/admin.php(175): do_action('...')
    "/tmp/trace2.txt" 28L, 3512B                                                                                                                                    1,1           Top
    #0 /drive/www/emmywatch/wp-content/plugins/autoptimize/classes/autoptimizeCache.php(451): autoptimizeCache::clearall(false)
    #2 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #3 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /drive/www/emmywatch/wp-content/plugins/wp-super-cache/wp-cache-phase2.php(2975): do_action('...')
    #5 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/inc/class-wpseo-utils.php(421): wp_cache_clear_cache()
    #6 /drive/www/emmywatch/wp-includes/class-wp-hook.php(310): WPSEO_Utils::clear_cache(Array)
    #7 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #8 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #9 /drive/www/emmywatch/wp-includes/option.php(570): do_action('...', Array, Array, '...')
    #10 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(507): update_option('...', Array)
    #11 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options.php(311): WPSEO_Options::save_option('...', '...', Array)
    #12 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/helpers/options-helper.php(37): WPSEO_Options::set('...', Array)
    #13 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/analytics/user-interface/last-completed-indexation-integration.php(61): Yoast\WP\SEO\Helpers\Options_Helper->set('...', Array)
    #14 /drive/www/emmywatch/wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Analytics\User_Interface\Last_Completed_Indexation_Integration->maybe_set_indexables_unindexed_calculated('...', 0)
    #15 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #16 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #17 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/actions/indexing/abstract-indexing-action.php(98): do_action('...', '...', '...')
    #18 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/actions/indexing/abstract-link-indexing-action.php(89): Yoast\WP\SEO\Actions\Indexing\Abstract_Indexing_Action->get_total_unindexed()
    #19 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/helpers/indexing-helper.php(318): Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->get_limited_unindexed_count(26)
    #20 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/helpers/indexing-helper.php(335): Yoast\WP\SEO\Helpers\Indexing_Helper->get_limited_unindexed_count(25)
    #21 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/integrations/admin/background-indexing-integration.php(181): Yoast\WP\SEO\Helpers\Indexing_Helper->get_limited_filtered_unindexed_count(25)
    #22 /drive/www/emmywatch/wp-content/plugins/wordpress-seo/src/integrations/admin/background-indexing-integration.php(139): Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->should_index_on_shutdown(25)
    #23 /drive/www/emmywatch/wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->register_shutdown_indexing('')
    #24 /drive/www/emmywatch/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #25 /drive/www/emmywatch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #26 /drive/www/emmywatch/wp-admin/admin.php(175): do_action('...')
    #27 /drive/www/emmywatch/wp-admin/index.php(10): require_once('...')
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @emilycestmoi

    I’m sorry about your experience. We currently have a feature request to provide an option to deactivate the clearing of the cache on plugin activation, deactivation and updates.

    Our product team will assess the feature request and assign a priority level to the report. Our developers work on the highest priority issues first. We cannot give you an estimate of when or if they’ll start working on the request.

    If you have any further information that may affect the prioritization, please leave a comment or subscribe to the GitHub report to get updates on the issue.

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

    Hello all,

    The same problem occurs on 2 of our websites on which we use both Yoast SEO & WP Super Cache.

    Indeed the bug still occurs as explained above by OP after the latest updates. And those 2 issue tracker links provided by @maybellyne give a 404 error. There are 2 threads (including this which also provides a php profiler) currently referring to this issue, and they are both marked as resolved.

    Is your team aware of the problem? If so, do you have any estimation as of when this will be resolved?

    Thank you.

    Hey @erubbereu,

    There is an open issue on our repository, but there is no currently no clear trajectory about it. It’s a quite specific issue where we are not clear what is cause. If you have any more specific information for our developers, feel free to add them to the issue. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Yoast is breaking site: don’t clear cache on option update’ is closed to new replies.