#cache #ttl #expire

izihawa_ttl_cache

A cache that will expire values after a TTL

1 unstable release

0.5.1 Sep 29, 2023

#263 in Caching

Download history 63/week @ 2024-01-08 275/week @ 2024-01-29 7/week @ 2024-02-19 20/week @ 2024-02-26 192/week @ 2024-03-04 8/week @ 2024-03-11 27/week @ 2024-04-01 359/week @ 2024-04-15

386 downloads per month
Used in 2 crates (via summa-core)

MIT/Apache

23KB
330 lines

ttl_cache

Actions Status Documentation

This crate provides a time sensitive key-value FIFO cache. When the cache is created it is given a TTL. Any value that are in the cache for longer than this duration are considered invalid and will not be returned. Supports 1.20 +


lib.rs:

This crate provides a time sensitive key-value cache. When an item is inserted it is given a TTL. Any value that are in the cache after their duration are considered invalid and will not be returned on lookups. Entries are not removed from the cache on expiration. Instead the expired values are removed opportunistically as they are reference or if remove_expired is explicitly called.

Dependencies

~0–1.4MB
~27K SLoC