Skip to content

Commit a123db7

Browse files
committed
RedisBuffer
1 parent 8d81294 commit a123db7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/AudioTools/Communication/RedisBuffer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ namespace audio_tools {
88

99
/**
1010
* @brief Buffer implementation that stores and retrieves data from a Redis
11-
* server using Arduino Client.
11+
* server using the Arduino Client.
1212
*
1313
* This buffer uses a Redis list as a circular buffer and batches read/write
1414
* operations for efficiency. Individual write/read calls are buffered locally
1515
* using SingleBuffer and only sent to Redis in bulk when writeArray/readArray
1616
* is called or when the buffer is full/empty. This reduces network overhead and
1717
* improves performance for streaming scenarios.
1818
*
19-
* - Uses RPUSH for writing and LRANGE/LTRIM for reading from Redis.
19+
* - Uses RPUSH for writing and LPOP for reading from Redis.
2020
* - All Redis commands are constructed using the RESP protocol and sent via the
2121
* Arduino Client API.
2222
* - The buffer size for local batching can be configured via the constructor.
@@ -35,12 +35,12 @@ class RedisBuffer : public BaseBuffer<T> {
3535
* EthernetClient).
3636
* @param key Redis key to use for the buffer (list).
3737
* @param max_size Maximum number of elements in the buffer.
38-
* @param local_buf_size Size of the local buffer for batching (default: 32).
38+
* @param local_buf_size Size of the local buffer for batching (default: 512).
3939
* @param expire_seconds Number of seconds after which the Redis key should
4040
* expire (0 = no expiration).
4141
*/
4242
RedisBuffer(Client& client, const char* key, size_t max_size,
43-
size_t local_buf_size = 512, int expire_seconds = 10 * 60)
43+
size_t local_buf_size = 512, int expire_seconds = 60 * 60)
4444
: client(client),
4545
key(key),
4646
max_size(max_size),

0 commit comments

Comments
 (0)