Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HyperDB - Send Reads to Master.
<?php
/**
* Plugin Name: Send Reads to Master
* Description: Suggested fix for backend replication lag
* Author: WP Engine
* Version: 0.2
*
*/
if ( is_admin() ) {
global $wpdb;
$wpdb->send_reads_to_masters();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment