MCPcopy Create free account
hub / github.com/TabularisDB/tabularis / clearAutocompleteCache

Function clearAutocompleteCache

src/utils/autocomplete.ts:97–105  ·  view source on GitHub ↗
(connectionId?: string)

Source from the content-addressed store, hash-verified

95
96// Clear cache for a specific connection (call on disconnect)
97export const clearAutocompleteCache = (connectionId?: string) => {
98 if (connectionId) {
99 const keysToDelete = Array.from(columnsCache.keys())
100 .filter(key => key.startsWith(`${connectionId}:`));
101 keysToDelete.forEach(key => columnsCache.delete(key));
102 } else {
103 columnsCache.clear();
104 }
105};
106
107let sqlCompletionProvider: { dispose: () => void } | null = null;
108

Callers 3

disconnectFunction · 0.90
DatabaseProviderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected