Skip to content

Commit a1cb695

Browse files
committed
[jan] Support Redis Sentinel configuration (Michael Menge <[email protected]>, Request #14998).
1 parent 713e6af commit a1cb695

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

doc/Horde/Core/changelog.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
identifier: LGPL-2.1
157157
uri: http://www.horde.org/licenses/lgpl21
158158
notes: |
159+
[jan] Support Redis Sentinel configuration (Michael Menge <[email protected]>, Request #14998).
159160
[mjr] Fix checking for active APIs for ActiveSync without throwing exceptions.
160161
[mjr] Fix setting and semantic meaning of the 'oofstate' property when returning Out of Office data to EAS clients.
161162
[mjr] Detect if the failure was due to trying to delete a special mailbox (Bug #14732).

lib/Horde/Core/Factory/HashTable.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,17 @@ public function create(Horde_Injector $injector)
9494
$redis_params = reset($redis_params);
9595
}
9696

97+
$redis_replication_options = array();
98+
if (!empty($params['replication'])) {
99+
$redis_replication_options = array(
100+
'replication' => $params['replication'],
101+
'service' => !empty($params['service']) ? $params['service'] : null,
102+
);
103+
}
104+
97105
return new Horde_HashTable_Predis(array(
98106
'logger' => $logger,
99-
'predis' => new Predis\Client($redis_params)
107+
'predis' => new Predis\Client($redis_params, $redis_replication_options)
100108
));
101109

102110
case 'memory':

0 commit comments

Comments
 (0)