Skip to content

Clarification Request: LRU vs FIFO #145

Description

@vauvenal5

Based on the generated code when the limit is reached you are deleting the first entry in the map. This is not necessarily the least recently used entry in the cache.

So to my understanding this actually behaves like a FIFO and not like a LRU cache.

For a true LRU cache you would need to change the order of the map by for example removing and re-adding the found item making sure that the first item in the list is the one which was not been used for the longest time.

Am I missing something here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions