Skip to content

Maintenance: extract lru-cache implementation into commons package #2898

Closed
@dreamorosi

Description

@dreamorosi

Summary

The Idempotency utility has an implementation of LRU (Least Recently Used) cache that is used to keep idempotency records in memory. At present this utility is not exposed to consumers and so cannot be used outside of the utility.

With this issue I propose to move that implementation to the commons package and export it as a sub-path export so that it can be selectively used by other utilities or customers.

Why is this needed?

So that other utilities as well as customers can use it.

Currently the JMESPath utility uses a naive cache that simply evicts half of the entries when the max size is used. Switching to a LRU implementation would allow to keep around values that are used more often.

Which area does this relate to?

Commons

Solution

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

commonsThis item relates to the Commons UtilitycompletedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions