WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Cache Flush dumping persistent cache (3 posts)

  1. Todd Lahman
    Member
    Posted 1 year ago #

    DO NOT wp_cache_flush

    In the /wordpress-seo/inc/class-sitemaps.php, inside the build_post_type_map() method:

    Line 263 executes the wp_cache_flush() function.

    DO NOT run the wp_cache_flush()! This kept dumping all the persistent data from memcached for each blog I had your WordPress SEO plugin installed on, even the WordPress cached data, which caused all the data to be rebuilt, and a huge server CPU load as the traffic hit a blog with no cache.

    Next, on Line 419 is the function wp_cache_delete( $p->ID, 'post_meta' ).

    DO NOT delete the post_meta! What's the point?

    Persistent cache means it needs to persist, otherwise the database will get hit so the data can be restored to the cache.

    If you don't need the post_meta data then just leave it alone. If you need to change it use wp_cache_set(), which will add the data if it doesn't exist, or replace it if it does.

    I am really surprised at how you used these two functions, when wp_cache_set was all you needed. It took me some time to track down this issue, and the only reason I discovered it is because I've developed some plugins that only store data in memcached. The plugin data kept getting dumped mysteriously, and the get hits percentage dropped into the 80 percent range, when it has been 95-97 on my blogs for years, and is now again.

    Please make these changes to your plugin so I don't have to write an SEO plugin myself.

    Also take a look at this from 2 months ago, and fix your Google Analytics plugin. There's no reason to load jQuery if it isn't needed.

    http://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-load-jquery-and-comment-tracking-only-if-have-comments

    Thank you for the great plugins, that have also caused some big headaches, but are still much appreciated.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. rjd22
    Member
    Posted 1 year ago #

    Thanks a lot Todd I was having the same issues. I as a develop have to agree with Todd. This is really onprofessional to just delete stuff from the cache. It is the developer of the site that decides how to optimise it's site not the creator of the plugin.

    Don't understand me wrong here. I think your plugin is great but you are bleaking other people their plugins.

  3. joshua strebel
    Member
    Posted 1 year ago #

    Looks like Yoast corrected this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic