-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(cache): redis global cache #6315
Conversation
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
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 think we should change the redis libr to handy-redis.
It has better typescript support and recent releases.
I can do the switch.
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.
some type safety
|
||
export function end(): void { | ||
try { | ||
client?.redis?.end(true); // TODO: Why is this not supported by client directly? |
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.
@viceice I wonder if I'm missing something here. Renovate wouldn't exit without the redis client being cleaned up, so I can't understand why it is not a first-class function in handy-redis.
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.
strange, client.quit()
is there
@@ -85,6 +85,7 @@ export async function start(): Promise<0 | 1> { | |||
await repositoryWorker.renovateRepository(repoConfig); | |||
} | |||
setMeta({}); | |||
globalCache.cleanup(config); |
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.
Maybe we should call this in finally and use redis.quit
instead of end
🎉 This PR is included in version 20.3.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Adds redis as an option for the global cache.
global.renovateCache
will be refactored later.