Title: [Plugin: WordPress SEO by Yoast] Cache Flush dumping persistent cache
Last modified: August 20, 2016

---

# [Plugin: WordPress SEO by Yoast] Cache Flush dumping persistent cache

 *  [Todd Lahman](https://wordpress.org/support/users/toddlahman/)
 * (@toddlahman)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-cache-flush-dumping-persistent-cache-2/)
 * 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](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/](http://wordpress.org/extend/plugins/wordpress-seo/)

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

 *  [rjd22](https://wordpress.org/support/users/rjd22/)
 * (@rjd22)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-cache-flush-dumping-persistent-cache-2/#post-2866572)
 * 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.
 *  [joshua strebel](https://wordpress.org/support/users/joshuastrebel/)
 * (@joshuastrebel)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-cache-flush-dumping-persistent-cache-2/#post-2866663)
 * Looks like Yoast corrected this.

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

The topic ‘[Plugin: WordPress SEO by Yoast] Cache Flush dumping persistent cache’
is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [joshua strebel](https://wordpress.org/support/users/joshuastrebel/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-cache-flush-dumping-persistent-cache-2/#post-2866663)
 * Status: not resolved