Crate fondue

Source

Re-exports§

pub use cache::cache_clear_all;
pub use cache::cache_get;
pub use cache::cache_get_with_limit;
pub use cache::cache_get_with_ttl;
pub use cache::cache_get_with_ttl_and_limit;
pub use cache::cache_invalidate;
pub use cache::Cache;
pub use cache::CacheEntry;
pub use cache::EvictionPolicy;
pub use cache::TtlType;
pub use context::CacheContext;
pub use duration::parse_duration;
pub use stats::aggregate_stats;
pub use stats::clear_stats;
pub use stats::export_json;
pub use stats::get_stats;
pub use stats::print_stats;
pub use stats::print_stats_table;
pub use stats::register_stats;
pub use stats::update_stats;
pub use stats::CacheStats;
pub use stats::GlobalStats;

Modules§

cache
context
duration
stats

Macros§

cache
Cache macros
cache_with_limit
Cache macro with limit support specifying maximum entries. Usage: cache_with_limit!("namespace", "key", 10, || compute_value())
cache_with_ttl
Cache macro with TTL support. Usage: cache_with_ttl!("namespace", "key", "200ms", TtlType::Fixed, || compute_value())
cache_with_ttl_and_limit
Cache macro with both TTL and limit support. Usage: cache_with_ttl_and_limit!("namespace", "key", "500ms", 5, TtlType::Sliding, || compute_value())