* Clear internal caches
()
| 386 | * Clear internal caches |
| 387 | */ |
| 388 | clearCaches(): void { |
| 389 | this.nodeCache.clear(); |
| 390 | this.fileCache.clear(); |
| 391 | this.importMappingCache.clear(); |
| 392 | this.reExportCache.clear(); |
| 393 | this.nameCache.clear(); |
| 394 | this.lowerNameCache.clear(); |
| 395 | this.qualifiedNameCache.clear(); |
| 396 | this.fileLinesCache.clear(); |
| 397 | this.methodMatchCache.clear(); |
| 398 | this.methodOwnerIndexCache.clear(); |
| 399 | this.supertypeMemo.clear(); |
| 400 | this.supertypeGen++; |
| 401 | this.nodesByKindCache.clear(); |
| 402 | this.knownNames = null; |
| 403 | this.knownFiles = null; |
| 404 | this.cachesWarmed = false; |
| 405 | // The import-resolver's and name-matcher's per-context memos assume the |
| 406 | // same stable window as the caches above — drop them together. |
| 407 | if (this.context) { |
| 408 | clearImportResolverMemos(this.context); |
| 409 | clearNameMatcherMemos(this.context); |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | /** `readFile` through the LRU content cache (null = read failed, also cached). */ |
| 414 | private readFileCached(filePath: string): string | null { |
no test coverage detected