Commit eb22388
Address PR review comments: remove dead code and clarify TTL behavior
1. Remove deprecated acquire_slot() method (PR comment #1)
- Method marked as deprecated, not used anywhere in codebase
- check_and_acquire() is the only method used (atomic operation)
- Dead code removal improves maintainability
2. Add detailed comment explaining TTL vs manual cleanup (PR comment #2)
- Clarifies why _cleanup_expired_entries() is needed even with TTL
- Redis ZSET TTL expires entire key, not individual entries
- Manual cleanup (ZREMRANGEBYSCORE) removes stale entries within ZSET
- Both mechanisms work together for accurate rate limiting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 434f7ec commit eb22388
1 file changed
Lines changed: 7 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| |||
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | 343 | | |
380 | 344 | | |
381 | 345 | | |
| |||
0 commit comments