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.
Thank you for the great plugins, that have also caused some big headaches, but are still much appreciated.
- The topic ‘[Plugin: WordPress SEO by Yoast] Cache Flush dumping persistent cache’ is closed to new replies.