Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(commons): extract lru-cache into commons #2899

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR moves the implementation of the LRUCache class from the Idempotency package to the commons one. Additionally, it also exports it via the @aws-lambda-powertools/commons/utils/lru-cache export, so that customers or other utility can import and use it as needed.

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: closes #2898


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi dreamorosi self-assigned this Aug 7, 2024
@dreamorosi dreamorosi requested review from a team as code owners August 7, 2024 15:57
@boring-cyborg boring-cyborg bot added commons This item relates to the Commons Utility dependencies Changes that touch dependencies, e.g. Dependabot, etc. idempotency This item relates to the Idempotency Utility tests PRs that add or change tests labels Aug 7, 2024
@pull-request-size pull-request-size bot added the size/S PR between 10-29 LOC label Aug 7, 2024
@pull-request-size pull-request-size bot added size/M PR between 30-99 LOC and removed size/S PR between 10-29 LOC labels Aug 7, 2024
@dreamorosi
Copy link
Contributor Author

As additional datapoint, I've been wanting to use this LRU cache at least a couple of times in other projects and couldn't because it wasn't exported.

@dreamorosi dreamorosi requested a review from am29d August 7, 2024 16:18
Copy link

sonarcloud bot commented Aug 7, 2024

@am29d am29d merged commit b064408 into main Aug 7, 2024
9 checks passed
@am29d am29d deleted the chore/extract-lru-cache-to-commons branch August 7, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commons This item relates to the Commons Utility dependencies Changes that touch dependencies, e.g. Dependabot, etc. idempotency This item relates to the Idempotency Utility size/M PR between 30-99 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: extract lru-cache implementation into commons package
2 participants