Skip to content

Change LRUMap to just evict one entry when maxEntries reached #3530

Closed
@pjfanning

Description

@pjfanning

Current implementation clears full map when maxEntries reached. jackson-dataformat-csv has its own separate LRUMap[1] and it only evicts the eldest entry when you add a new entry after the maxEntries is reached. Would it be possible to have jackson-databind LRUMap use similar logic? The change would require LRUMap to subclass LinkedHashMap.

[1] https://github.com/FasterXML/jackson-dataformats-text/blob/2.14/csv/src/main/java/com/fasterxml/jackson/dataformat/csv/impl/LRUMap.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions