pub unsafe extern "C" fn aws_cache_new_lru(
allocator: *mut aws_allocator,
hash_fn: aws_hash_fn,
equals_fn: aws_hash_callback_eq_fn,
destroy_key_fn: aws_hash_callback_destroy_fn,
destroy_value_fn: aws_hash_callback_destroy_fn,
max_items: usize
) -> *mut aws_cache
Expand description
Initializes the Least-recently-used cache. Sets up the underlying linked hash table.
Once max_items
elements have been added, the least recently used item will be removed. For the other parameters,
see aws/common/hash_table.h. Hash table semantics of these arguments are preserved.(Yes the one that was the answer
to that interview question that one time).