alleyinteractive / wp-bulk-task

A library to assist with running performant bulk tasks against WordPress database objects.
GNU General Public License v2.0
15 stars 0 forks source link

Fix logic to reset runtime cache when using Object Cache Pro #8

Closed dlh01 closed 10 months ago

dlh01 commented 10 months ago

Object Cache Pro, the caching plugin recommended by Pantheon, includes its own interface with a ::flush_runtime() method that clears the in-memory cache.

The default method of resetting the cache in \Alley\WP_Bulk_Task\Bulk_Task::after_batch() relies on access to the WP_Object_Cache::$cache property, which isn't made accessible by Object Cache Pro, so the attempt to write to it generates an error.