pub unsafe extern "C" fn lv_cache_add(
cache: *mut lv_cache_t,
key: *const c_void,
user_data: *mut c_void,
) -> *mut lv_cache_entry_tExpand description
Add a new cache entry with the given key and data. If the cache is full, the cache’s policy will be used to evict an entry.
@param cache The cache object pointer to add the entry.
@param key The key of the entry to add.
@param user_data A user data pointer that will be passed to the create callback.
@return Returns a pointer to the added cache entry on success with lv_cache_entry_t::ref_cnt incremented, NULL on error.