@@ 150-157 (lines=8) @@ | ||
147 | public function getMulti( array $keys, $flags = 0 ) { |
|
148 | $batches = []; |
|
149 | $conns = []; |
|
150 | foreach ( $keys as $key ) { |
|
151 | list( $server, $conn ) = $this->getConnection( $key ); |
|
152 | if ( !$conn ) { |
|
153 | continue; |
|
154 | } |
|
155 | $conns[$server] = $conn; |
|
156 | $batches[$server][] = $key; |
|
157 | } |
|
158 | $result = []; |
|
159 | foreach ( $batches as $server => $batchKeys ) { |
|
160 | $conn = $conns[$server]; |
|
@@ 194-201 (lines=8) @@ | ||
191 | public function setMulti( array $data, $expiry = 0 ) { |
|
192 | $batches = []; |
|
193 | $conns = []; |
|
194 | foreach ( $data as $key => $value ) { |
|
195 | list( $server, $conn ) = $this->getConnection( $key ); |
|
196 | if ( !$conn ) { |
|
197 | continue; |
|
198 | } |
|
199 | $conns[$server] = $conn; |
|
200 | $batches[$server][] = $key; |
|
201 | } |
|
202 | ||
203 | $expiry = $this->convertToRelative( $expiry ); |
|
204 | $result = true; |