* Ground-truth size of the buffer (LLEN of the Redis list). O(1). The * previous implementation kept a shadow counter to "avoid" LLEN — but * LLEN and GET are both O(1) single-roundtrip ops in Redis, so the * counter was free complexity that silently drifted (see incident * 2026-05-20).
()
| 273 | * 2026-05-20). Always use this. |
| 274 | */ |
| 275 | async getBufferSize(): Promise<number> { |
| 276 | return await getRedisCache().llen(this.getRedisListKey()); |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * Time the body of an `add()` call. Subclasses wrap their work with this |
no test coverage detected