Skip to content

cache

Caches and stores whose entries expire. The clock is always passed in, never read.

Cargo feature cache (enabled by default). To compile only this module:

cargo add helpers4 --no-default-features --features cache

or in Cargo.toml:

[dependencies]
helpers4 = { version = "0.0.5", default-features = false, features = ["cache"] }

Import path: helpers4::cache.

ItemWhat it does
ExpiringMapA map whose entries expire, with the clock passed in by the caller.
ExpiringSetA set whose members expire: an ExpiringMap without values.