lruttl

Macro declare_cache

Source
macro_rules! declare_cache {
    ($vis:vis
        static $sym:ident:
        LruCacheWithTtl<$key:ty, $value:ty>::new($name:expr, $capacity:expr);
    ) => { ... };
}
Expand description

Declare a cache as a static, and link it into the list of possible pre-defined caches.

Due to a limitation in implementation details, you must also add linkme.workspace = true to the manifest of the crate where you use this macro.