Implement an enable() / disable() feature for memcached based object-cache
|Reported by:||Denis-de-Bernardy||Owned by:|
I've a plugin (XML Sitemaps) that does a few mass queries through the WP API, but it does so while stripping out a bunch of fields from the main query:
This is in order to avoid using more memory than is actually needed. The downside is that it ends up poisoning whatever is in memcached, so I end up flushing the mess before and after working on the sitemap.
I'm investigating alternative means to do this without needing to flush the whole thing.
At the moment, I'm leaning towards adding the posts, postmeta, etc. groups as non-persistent before generating the sitemap. What would be much better, however, would be an enable()/disable() feature. When disabled, the object cache would not send anything to memcached when the add()/set()/replace()/delete() methods are used.