I use W3 Total Cache, as my caching plugin. I specifically use the Object Cache, to improve the speed of my WP install.
I was doing some testing, to see if I could speed up my site, and saw that many queries were being repeated over and over against my DB. I investigated and saw that data was being stored in the object cache, but found that the object cache was being flushed periodically, about once every 5 minutes.
I tracked the cause being this plugin. It stores the last run time in the wp options table, using update_option method.
When an option is updated, this causes the Object Cache to be flushed, as the options are also stored in the object cache.
This then causes all of the stored data to be flushed and all of the queries have to be re-executed.
I’m pretty sure most persistent object cache’s also flush when the options are ever updated (Super Cache, etc). This increases load on the DB and slows down performance for WP.
Please consider using another mechanism to store the last run time of the plugin. I believe the options data should be pretty much static. It shouldn’t be updated every 5 minutes. It should only be updated whenever the admin makes a material change to WP or plugin settings, which does not happen in the normal execution of the site.
I’m not sure where to store this info though. Because I’m using a persistent object cache, I can make the change in my own local copy to store the last run time in the object cache (wp_cache_set() ), instead of the update_option(). This would work in my case, but would not work for everyone, as they may not be using a persistent cache.
- The topic ‘Possible Plugin Improvement’ is closed to new replies.