No replication
Last updated on
30 April 2025
It is possible to use AutoSlave for one db server (i.e. not using replication).
The reason for doing this, is that AutoSlave provides the transactional safe cache backend.
<?php
$databases['default']['master'] = array (
'database' => 'mydatabase',
'username' => 'readwrite',
'password' => 'readwrite',
'host' => 'master1',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
);
$databases['default']['default'] = array (
'driver' => 'autoslave',
'master' => array('master'),
'slave' => array('master'),
'replication lag' => 0,
'global replication lag' => FALSE,
);
// Load cache backends
$conf['cache_backends'] = array(
'sites/all/modules/memcache/memcache.inc',
'sites/all/modules/autoslave/autoslave.cache.inc',
);
else {
// Transactional safe memcache
$conf['cache_default_class'] = 'AutoslaveCache';
$conf['autoslave_cache_default_class'] = 'MemCacheDrupal';
}
?>
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion