* @brief remove the given object from the cache * note that eviction should not call this function, but rather call * `cache_evict_base` because we track extra metadata during eviction * * and this function is different from eviction * because it is used to for user trigger * remove, and eviction is used by the cache to make space for new objects * * it needs to call cache_remove_obj_base
| 235 | * @param obj |
| 236 | */ |
| 237 | static void LRU_remove_obj(cache_t *cache, cache_obj_t *obj) { |
| 238 | assert(obj != NULL); |
| 239 | |
| 240 | LRU_params_t *params = (LRU_params_t *)cache->eviction_params; |
| 241 | |
| 242 | remove_obj_from_list(¶ms->q_head, ¶ms->q_tail, obj); |
| 243 | cache_remove_obj_base(cache, obj, true); |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * @brief remove an object from the cache |
nothing calls this directly
no test coverage detected