wp_cache_get works on every WordPress site and on most of them it is an array that is discarded at the end of the request — which is still useful and is not what people assume.
$rows = wp_cache_get( $key, 'turkerdev_reports' );
if ( false === $rows ) {
$rows = $wpdb->get_results( /* ... */ );
wp_cache_set( $key, $rows, 'turkerdev_reports', 300 );
}
// persistent only if wp-content/object-cache.php exists:
// $ wp cache type
// Redis Object Cache
Even without a persistent backend this turns a page that queries the same thing four times into one that queries it once, which is worth doing unconditionally. The expiry argument is ignored entirely by the default in-memory implementation, so code that depends on a TTL behaves differently depending on the drop-in. wp cache type answers which one is installed, and it is worth checking before assuming anything about a site you did not build.