( source: SettingSource, )
| 20 | const perSourceCache = new Map<SettingSource, SettingsJson | null>() |
| 21 | |
| 22 | export function getCachedSettingsForSource( |
| 23 | source: SettingSource, |
| 24 | ): SettingsJson | null | undefined { |
| 25 | // undefined = cache miss; null = cached "no settings for this source" |
| 26 | return perSourceCache.has(source) ? perSourceCache.get(source) : undefined |
| 27 | } |
| 28 | |
| 29 | export function setCachedSettingsForSource( |
| 30 | source: SettingSource, |
no test coverage detected