How to get all cached values?
gitmalong opened this issue · comments
It is possible to get all key, value pairs from the cache?
#[cached(
result = true,
convert = r##"{ format!("{}", address) }"##,
type = "SizedCache<String, Option<A>>",
create = "{ SizedCache::with_size(10000) }",
sync_writes = true
)]
Yes, the macro creates a cache instance with the name of the function in all caps (see
cached/examples/basic_proc_macro.rs
Line 37 in e6814aa
SizedCached
Line 135 in e6814aa