-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Conversation
vary.js
Outdated
@@ -1,6 +1,6 @@ | |||
'use strict' | |||
|
|||
const LRUCache = require('mnemonist/lru-cache') | |||
const { Lru: LRUCache } = require('toad-cache') |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Co-authored-by: Gürgün Dayıoğlu <[email protected]> Signed-off-by: Frazer Smith <[email protected]>
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
npm run test
andnpm run benchmark
and the Code of conduct