$wpdb->get_results() will never return false here, so we don't need to rely upon the $found flag that's not available in all object caches.
This fixes job query caching when running on a persistent cache which doesn't implement the $found parameter or doesn't consider in-memory caches as "found" (see https://github.com/Automattic/wp-memcached/issues/61).
I noticed a duplicate job query when updating WordPress.org with the plugin, stemming from Jetpack calling both wp_next_scheduled() and wp_get_schedule().
Props @peterwilsoncc for confirming that $wpdb->get_results() always returns an array.
$wpdb->get_results()
will never return false here, so we don't need to rely upon the$found
flag that's not available in all object caches.This fixes job query caching when running on a persistent cache which doesn't implement the
$found
parameter or doesn't consider in-memory caches as "found" (see https://github.com/Automattic/wp-memcached/issues/61).I noticed a duplicate job query when updating WordPress.org with the plugin, stemming from Jetpack calling both
wp_next_scheduled()
andwp_get_schedule()
.Props @peterwilsoncc for confirming that
$wpdb->get_results()
always returns an array.