mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 09:06:25 +00:00
19 lines
344 B
TypeScript
19 lines
344 B
TypeScript
let repoCache: Record<string, any> | undefined;
|
|
|
|
export function init(): void {
|
|
repoCache = {};
|
|
}
|
|
|
|
export function reset(): void {
|
|
repoCache = undefined;
|
|
}
|
|
|
|
export function get<T = any>(key: string): T {
|
|
return repoCache?.[key];
|
|
}
|
|
|
|
export function set(key: string, value: any): void {
|
|
if (repoCache) {
|
|
repoCache[key] = value;
|
|
}
|
|
}
|