> For the complete documentation index, see [llms.txt](https://3440217568.gitbook.io/rxswift/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://3440217568.gitbook.io/rxswift/decision_tree/buffer.md).

# buffer

**缓存元素，然后将缓存的元素集合，周期性的发出来**

![](https://4217506537-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWj545abP2yK86-qksJ%2Fsync%2Fd049f54c2b54914fc8e09358bccb1d18f607716f.png?generation=1616819383476594\&alt=media)

**buffer** 操作符将缓存 `Observable` 中发出的新元素，当元素达到某个数量，或者经过了特定的时间，它就会将这个元素集合发送出来。
