Skip to content

build(deps): replace mnemonist with toad-cache #366

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

Merged
merged 3 commits into from
Mar 25, 2025
Merged

build(deps): replace mnemonist with toad-cache #366

merged 3 commits into from
Mar 25, 2025

Conversation

Fdawgs
Copy link
Member

@Fdawgs Fdawgs commented Mar 24, 2025

Every other Fastify repo that has an lru cache uses toad-cache, so it makes sense to move this over so they used a shared dependency, reducing the size of node_modules by teeny amount.

Checklist

@Fdawgs Fdawgs requested review from gurgunday and kibertoad March 24, 2025 16:43
vary.js Outdated
@@ -1,6 +1,6 @@
'use strict'

const LRUCache = require('mnemonist/lru-cache')
const { Lru: LRUCache } = require('toad-cache')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if we can get away with fifo. do we ever expect and overflow here or cache is big enough?

Copy link
Member

@gurgunday gurgunday Mar 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm down to changing it, LRU is not critical here imo like in a rate limiter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in ebdaa0a. Have also changed it to be a map as per kibertoad/toad-cache#40

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Fdawgs and others added 2 commits March 25, 2025 03:17
Co-authored-by: Gürgün Dayıoğlu <[email protected]>
Signed-off-by: Frazer Smith <[email protected]>
@mcollina mcollina merged commit f0f0e7f into main Mar 25, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants