From fa02ddd51d45c2ba6a2bb2d330f54950ddefe2b6 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 6 Jun 2019 17:59:06 +0200 Subject: Add maxlen and approximate parameter to example of xAdd --- README.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'README.markdown') 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 -- cgit v1.2.3