cache-low-level-system-design
cache-low-level-system-design copied to clipboard
Wrong Behaviour When Adding a Key Again
Case - Adding the key which is already exist in the Cache with some new value
Expected Behaviour -
Update the value associated with the key. Mark the key as recently used — move it to the "most recently used" position in linked list(At the last as per current implementation) Do NOT increase the size of the cache.
Actual Behaviour - Eldest Key is removed unnecessary