Skip to content
Snippets Groups Projects
Commit 63a63542 authored by joe's avatar joe Committed by lucha
Browse files

support flexihasher with more replicas (allowing for a more even distribution)

parent f981f56b
No related branches found
No related tags found
No related merge requests found
<?php
require_once(dirname(__FILE__) . '/flexihash.php');
require_once( ABSPATH . 'wp-config.php' );
$wpdb->hash_map = new Flexihash();
$wpdb->hash_map = new Flexihash(null, R2DB_FLEXIHASH_REPLICAS);
/* Hashing function to map blogs to databases.
*
......@@ -16,4 +17,3 @@ function noblogs_db_callback($query, $wpdb) {
}
}
$wpdb->add_callback('noblogs_db_callback');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment