@@ 379-386 (lines=8) @@ | ||
376 | return $result; |
|
377 | } |
|
378 | ||
379 | public function set( $key, $value, $exptime = 0, $flags = 0 ) { |
|
380 | $ok = $this->setMulti( [ $key => $value ], $exptime ); |
|
381 | if ( ( $flags & self::WRITE_SYNC ) == self::WRITE_SYNC ) { |
|
382 | $ok = $this->waitForReplication() && $ok; |
|
383 | } |
|
384 | ||
385 | return $ok; |
|
386 | } |
|
387 | ||
388 | protected function cas( $casToken, $key, $value, $exptime = 0 ) { |
|
389 | list( $serverIndex, $tableName ) = $this->getTableByKey( $key ); |
|
@@ 491-498 (lines=8) @@ | ||
488 | return $newValue; |
|
489 | } |
|
490 | ||
491 | public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) { |
|
492 | $ok = $this->mergeViaCas( $key, $callback, $exptime, $attempts ); |
|
493 | if ( ( $flags & self::WRITE_SYNC ) == self::WRITE_SYNC ) { |
|
494 | $ok = $this->waitForReplication() && $ok; |
|
495 | } |
|
496 | ||
497 | return $ok; |
|
498 | } |
|
499 | ||
500 | public function changeTTL( $key, $expiry = 0 ) { |
|
501 | list( $serverIndex, $tableName ) = $this->getTableByKey( $key ); |