May 31, 2024
What happens if the active cache and the victim cache swap roles in a concurrent scenario? Also, what do you think about this idea: Instead of swapping the two caches, when the active cache fills, replace the victim cache with the active ache and replace the victim cache with a new Map.