MCPcopy
hub / github.com/BenedictKing/ccx / Close

Function Close

backend-go/internal/thinkingcache/thinking_cache.go:122–132  ·  view source on GitHub ↗

Close closes the SQLite persistence handle.

()

Source from the content-addressed store, hash-verified

120
121// Close closes the SQLite persistence handle.
122func Close() error {
123 globalStore.mu.Lock()
124 defer globalStore.mu.Unlock()
125 if globalStore.db == nil {
126 return nil
127 }
128 err := globalStore.db.Close()
129 globalStore.db = nil
130 globalStore.dbPath = ""
131 return err
132}
133
134// ResetForTest clears the process-local cache.
135func ResetForTest() {

Callers

nothing calls this directly

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected