-
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
fix(cache): global cache init #6314
Conversation
# Conflicts: # lib/datasource/docker/index.spec.ts # lib/datasource/github-releases/index.spec.ts # lib/datasource/github-tags/index.spec.ts # lib/datasource/gitlab-tags/index.spec.ts # lib/datasource/helm/index.spec.ts # lib/datasource/npm/index.spec.ts # lib/datasource/nuget/index.spec.ts # lib/datasource/orb/index.spec.ts # lib/datasource/packagist/index.spec.ts # lib/datasource/pod/index.spec.ts # lib/datasource/ruby-version/index.spec.ts # lib/workers/pr/changelog/index.spec.ts
This comment has been minimized.
This comment has been minimized.
lib/util/cache/global/index.ts
Outdated
|
||
function getGlobalKey(namespace: string, key: string): string { | ||
return `global%%${namespace}%%${key}`; | ||
} | ||
|
||
export function get<T = any>(namespace: string, key: string): Promise<T> { | ||
if (!initComplete) { |
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.
Simply test for global.renovateCache
here, so you are able to override it in the app
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.
True, that's a better stepping stone. I plan to add Redis support here after this
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.
What about initialize renovateCache
in this file init function and simply set global.renovateCache = fileCache
?
This reverts commit b5e1c53.
🎉 This PR is included in version 20.2.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Refactors the global file cache so that it is inactive unless initialized.