function clearAllCaches
clearAllCaches(): void

Clear every module-level in-process cache.

Call after any operation that bypasses the normal write path (full reset, restore from backup) so stale reads cannot outlive the current isolate lifecycle. Both resetDatabase (in its finally block, so even a partial-drop failure invalidates caches) and restoreFromSql (after executeBatch completes) use this to guarantee a consistent post-operation view.

The caches themselves register with the cache registry when their modules load (a lazily-loaded module that never ran has no cache to clear), so this needs no static import of any cache module — only the per-isolate initDb ready-client cache lives here.

Return Type

void

Usage

import { clearAllCaches } from "docs/database.ts";