pub async fn remove_item<K: Key, S: MultiwriteNorFlash>(
flash: &mut S,
flash_range: Range<u32>,
cache: &mut impl KeyCacheImpl<K>,
data_buffer: &mut [u8],
search_key: &K,
) -> Result<(), Error<S::Error>>Expand description
Fully remove an item. Additional calls to fetch with the same key will return None until a new one is stored again.
This is really slow!
All items in flash have to be read and deserialized to find the items with the key. This is unlikely to be cached well.
Alternatively, e.g. when you don’t have a MultiwriteNorFlash flash, you could store your value inside an Option
and store the value None to mark it as erased.