From cd2e477991f98ddf47a65947298fb609407015d7 Mon Sep 17 00:00:00 2001 From: Savannah Date: Tue, 22 Aug 2023 10:39:35 -0400 Subject: [PATCH] Update docs/data-types/streams.md Co-authored-by: David Dougherty --- docs/data-types/streams.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data-types/streams.md b/docs/data-types/streams.md index 9ca9041527..378c99cd76 100644 --- a/docs/data-types/streams.md +++ b/docs/data-types/streams.md @@ -805,7 +805,7 @@ However trimming with **MAXLEN** can be expensive: streams are represented by ma XADD race:italy MAXLEN ~ 1000 * ... entry fields here ... ``` -The `~` argument between the **MAXLEN** option and the actual count means, I don't really need this to be exactly 1000 items. It can be 1000 or 1010 or 1030, just make sure to save at least 1000 items. With this argument, the trimming is performed only when we can remove a whole node. This makes it much more efficient, and it is usually what you want. You'll note here that the client libraries have various implementations of this, For example, the Python client defaults to approximate and has to be explicitly set to a true length. +The `~` argument between the **MAXLEN** option and the actual count means, I don't really need this to be exactly 1000 items. It can be 1000 or 1010 or 1030, just make sure to save at least 1000 items. With this argument, the trimming is performed only when we can remove a whole node. This makes it much more efficient, and it is usually what you want. You'll note here that the client libraries have various implementations of this. For example, the Python client defaults to approximate and has to be explicitly set to a true length. There is also the `XTRIM` command, which performs something very similar to what the **MAXLEN** option does above, except that it can be run by itself: