#hash-map #expiring #dictionary #expire #items #time

expiringdict

A dict / HashMap whose items expire over time

2 releases

0.1.2 Nov 15, 2024
0.1.0 Sep 16, 2024

#588 in Data structures

Download history 159/week @ 2024-09-13 26/week @ 2024-09-20 10/week @ 2024-09-27 4/week @ 2024-10-04 5/week @ 2024-10-11 2/week @ 2024-10-18 122/week @ 2024-11-15 6/week @ 2024-11-22 11/week @ 2024-12-06

139 downloads per month

BSD-3-Clause

5KB
93 lines

A dict / HashMap whose items expire over time.

See documentation for more info.

PS: there is a Python version too.


lib.rs:

A dict / HashMap whose items expire over time

This is a simple wrapper over HashMap and when you call its expire() method, items inserted early expire and disappear.

There is no external dependency like tokio or the like, but you need to call expire() at appropriate time.

No runtime deps