Skip to content

Instantly share code, notes, and snippets.

@octalmage
Last active November 23, 2015 15:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save octalmage/90b9a1e2d66740deaa84 to your computer and use it in GitHub Desktop.
Save octalmage/90b9a1e2d66740deaa84 to your computer and use it in GitHub Desktop.
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