Skip to content

Wrong Behaviour When Adding a Key Again #5

@guptamohit24

Description

@guptamohit24

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

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions