Read one cached geometry entry when the exact active variant is still retained.
( file: DiffFile, slot: keyof SectionGeometryCacheSlots, cacheKey: string, )
| 115 | |
| 116 | /** Read one cached geometry entry when the exact active variant is still retained. */ |
| 117 | function getCachedSectionGeometry( |
| 118 | file: DiffFile, |
| 119 | slot: keyof SectionGeometryCacheSlots, |
| 120 | cacheKey: string, |
| 121 | ) { |
| 122 | const cached = SECTION_GEOMETRY_CACHE.get(file)?.[slot]; |
| 123 | return cached?.key === cacheKey ? cached.geometry : null; |
| 124 | } |
| 125 | |
| 126 | /** Store one geometry entry, replacing stale variants for the same slot. */ |
| 127 | function setCachedSectionGeometry( |
no outgoing calls
no test coverage detected