39 LV_LRU_VALUE_TOO_LARGE
42typedef void (lv_lru_free_t)(
void * v);
43typedef struct _lv_lru_item_t lv_lru_item_t;
46 lv_lru_item_t ** items;
47 uint64_t access_count;
50 size_t average_item_length;
51 size_t hash_table_size;
53 lv_lru_free_t * value_free;
54 lv_lru_free_t * key_free;
55 lv_lru_item_t * free_items;
63lv_lru_t * lv_lru_create(
size_t cache_size,
size_t average_length, lv_lru_free_t * value_free,
64 lv_lru_free_t * key_free);
68lv_lru_res_t lv_lru_set(
lv_lru_t * cache,
const void * key,
size_t key_length,
void * value,
size_t value_length);
70lv_lru_res_t lv_lru_get(
lv_lru_t * cache,
const void * key,
size_t key_size,
void ** value);
72lv_lru_res_t lv_lru_remove(
lv_lru_t * cache,
const void * key,
size_t key_size);
void lv_lru_remove_lru_item(lv_lru_t *cache)