#hashmap #temporary #lru #cache #transient

transient-hashmap

Simple rust HashMap with transient entries

4 releases (2 breaking)

0.4.1 Mar 13, 2018
0.4.0 Mar 17, 2017
0.3.0 Jan 26, 2017
0.1.0 Feb 27, 2016

#3 in Caching

Download history 661/week @ 2018-11-17 848/week @ 2018-11-24 699/week @ 2018-12-01 773/week @ 2018-12-08 567/week @ 2018-12-15 484/week @ 2018-12-22 624/week @ 2018-12-29 897/week @ 2019-01-05 809/week @ 2019-01-12 669/week @ 2019-01-19 659/week @ 2019-01-26 806/week @ 2019-02-02 721/week @ 2019-02-09 636/week @ 2019-02-16 628/week @ 2019-02-23

4,507 downloads per month

MIT license

9KB
204 lines

transient-hashmap

Simple rust HashMap with transient entries.

Build Status

Documentation

Example

use transient_hashmap::TransientHashMap;

let entry_lifetime_seconds = 0;
let mut map = TransientHashMap::new(entry_lifetime_seconds);
map.insert(10, "Hello World");

// Clear old entries
map.prune();

// Item is not there
assert_eq!(map.contains_key(10), false);

Cargo.toml

[dependencies]
transient-hashmap = "0.4"

lib.rs:

HashMap with entries living for limited period of time.

No runtime deps