mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-02 01:28:38 +00:00
The cache copied Python's lazy expiry heap. Deleting or re-arming a key left a stale heap record, and a longer-lived key at the top kept those records in memory without bound. A TTL past the end of Duration also panicked while the lock was held, which poisoned it for every later call The cache now keeps one index record per entry in a BTreeSet and removes it with the entry, so there is nothing to compact. A write picks Expiry::KeepExisting or Expiry::Refresh, update() reads and writes under one lock, and deadlines saturate The Redis stores' memory tier uses update() and drops its second mutex. RouterCooldowns no longer panics on a cooldown too long to measure, and both crates lock with parking_lot |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| Cargo.toml | ||