You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*ARRAY:* Either an array with the key member and score of the higest or lowest element or an empty array if the timeout was reached without an element to pop.
2682
+
*ARRAY:* Either an array with the key member and score of the highest or lowest element or an empty array if the timeout was reached without an element to pop.
_**Description**_: Trim the stream length to a given maximum. If the "approximate" flag is pasesed, Redis will use your size as a hint but only trim trees in whole nodes (this is more efficient).
3808
3808
3809
3809
##### *Return value*
3810
-
*long*: The number of messages trimed from the stream.
3810
+
*long*: The number of messages trimmed from the stream.
Copy file name to clipboardExpand all lines: arrays.markdown
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ For instance, the keys “{user:1}:name” and “{user:1}:email” will be stor
121
121
## Custom key distribution function
122
122
In order to control the distribution of keys by hand, you can provide a custom function or closure that returns the server number, which is the index in the array of servers that you created the RedisArray object with.
123
123
124
-
For instance, instanciate a RedisArray object with `new RedisArray(array("us-host", "uk-host", "de-host"), array("distributor" => "dist"));` and write a function called "dist" that will return `2` for all the keys that should end up on the "de-host" server.
124
+
For instance, instantiate a RedisArray object with `new RedisArray(array("us-host", "uk-host", "de-host"), array("distributor" => "dist"));` and write a function called "dist" that will return `2` for all the keys that should end up on the "de-host" server.
125
125
126
126
### Example
127
127
<pre>
@@ -132,7 +132,7 @@ This declares that we started with 2 shards and moved to 4 then 8 shards. The nu
132
132
133
133
## Migrating keys
134
134
135
-
When a node is added or removed from a ring, RedisArray instances must be instanciated with a “previous” list of nodes. A single call to `$ra->_rehash()` causes all the keys to be redistributed according to the new list of nodes. Passing a callback function to `_rehash()` makes it possible to track the progress of that operation: the function is called with a node name and a number of keys that will be examined, e.g. `_rehash(function ($host, $count){ ... });`.
135
+
When a node is added or removed from a ring, RedisArray instances must be instantiated with a “previous” list of nodes. A single call to `$ra->_rehash()` causes all the keys to be redistributed according to the new list of nodes. Passing a callback function to `_rehash()` makes it possible to track the progress of that operation: the function is called with a node name and a number of keys that will be examined, e.g. `_rehash(function ($host, $count){ ... });`.
136
136
137
137
It is possible to automate this process, by setting `'autorehash' => TRUE` in the constructor options. This will cause keys to be migrated when they need to be read from the previous array.
Copy file name to clipboardExpand all lines: cluster.markdown
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ For all of these multiple key commands (with the exception of MGET and MSET), th
122
122
RedisCluster has specialized processing for MGET and MSET which allows you to send any number of keys (hashing to whichever slots) without having to consider where they live. The way this works, is that the RedisCluster class will split the command as it iterates through keys, delivering a subset of commands per each key's slot.
123
123
124
124
~~~php
125
-
// This will be delivered in two commands. First for all of the {hash1} keys,
125
+
// This will be delivered in two commands. First for all of the {hash1} keys,
@@ -183,5 +183,5 @@ The save path for cluster based session storage takes the form of a PHP GET requ
183
183
*_distribute_: phpredis will randomly distribute session reads between masters and any attached slaves (load balancing).
184
184
*_failover (string)_: How phpredis should distribute session reads between master and slave nodes.
185
185
*_none_ : phpredis will only communicate with master nodes
186
-
*_error_: phpredis will communicate with master nodes unless one failes, in which case an attempt will be made to read session information from a slave.
186
+
*_error_: phpredis will communicate with master nodes unless one fails, in which case an attempt will be made to read session information from a slave.
187
187
*_auth (string, empty by default)_: The password used to authenticate with the server prior to sending commands.
0 commit comments