mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +02:00
Add support for multiple randomly selected DB readers (config.php file updates)
This commit is contained in:
@@ -1229,6 +1229,14 @@ $config->dbStripMB4 = false;
|
||||
* if($config->requestMethod('GET') && !$config->requestPath($skipPaths)) {
|
||||
* $config->dbReader = [ 'host' => 'readonly.mydb.domain.com' ];
|
||||
* }
|
||||
*
|
||||
* // to have PW randomly select from multiple DB readers, nest the arrays (3.0.176+)
|
||||
* // if a connection fails, PW will try another randomly till it finds one that works
|
||||
* $config->dbReader = [
|
||||
* [ 'host' => 'mydb1.domain.com' ],
|
||||
* [ 'host' => 'mydb2.domain.com' ],
|
||||
* [ 'host' => 'mydb3.domain.com' ],
|
||||
* ];
|
||||
* ~~~~~
|
||||
*
|
||||
* @var array
|
||||
|
Reference in New Issue
Block a user