-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feature: Dynamic Cache Entry Expiry #199
Conversation
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.
Why so much lint diff?
Was the file not linted correctly before or is it bonked right now?
src/db/Cache.ts
Outdated
new Date().getTime() + | ||
parseInt(process.env.CACHE_EXPIRE_S || '100', 10) * 1000, | ||
}); | ||
set(type: string, args: string[], value: any, expiryInSeconds: number = 3600): void { |
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.
Should defualt to
new Date().getTime() +
parseInt(process.env.CACHE_EXPIRE_S || '100', 10) * 1000
@hkirat ummm significant lint difference could indicate a file was not previously linted according to the current project's linting rules, or the linting configuration has been updated or corrected can u pls check now |
/bounty $25 |
Let's goooooo |
This pull request enhances the existing Cache utility by introducing the capability to set dynamic expiry times fvor each cache entry. Previously the cache expiry time was statically set, limiting the utility's flexibility. With this update, users can specify the expiry time in seconds for each set operation, allowing for more nuanced cache control tailored to specific need.