diff options
author | Alexander Schranz <alexander@sulu.io> | 2019-06-06 18:59:06 +0300 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2019-06-06 20:09:42 +0300 |
commit | fa02ddd51d45c2ba6a2bb2d330f54950ddefe2b6 (patch) | |
tree | 89535e8da7d07d08975d2089645efa158f2586b5 /README.markdown | |
parent | 0c17bd27a03f499f96fad90fb2fec069c3408156 (diff) |
Add maxlen and approximate parameter to example of xAdd
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index b1693b36..40e52ddc 100644 --- a/README.markdown +++ b/README.markdown @@ -3347,7 +3347,7 @@ $obj_redis->xAck('stream', 'group1', ['1530063064286-0', '1530063064286-1']); ##### *Prototype* ~~~php -$obj_redis->xAdd($str_key, $str_id, $arr_message); +$obj_redis->xAdd($str_key, $str_id, $arr_message[, $i_maxlen, $boo_approximate]); ~~~ _**Description**_: Add a message to a stream @@ -3358,6 +3358,8 @@ _**Description**_: Add a message to a stream ##### *Example* ~~~php $obj_redis->xAdd('mystream', "*", ['field' => 'value']); +$obj_redis->xAdd('mystream', "*", ['field' => 'value'], 1000); // set max length of stream to 1000 +$obj_redis->xAdd('mystream', "*", ['field' => 'value'], 1000, true); // set max length of stream to ~1000 ~~~ ### xClaim |