MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / Close

Method Close

internal/cache/badger_cache.go:260–274  ·  view source on GitHub ↗

Close closes the badger database and stops the background GC goroutine.

()

Source from the content-addressed store, hash-verified

258
259// Close closes the badger database and stops the background GC goroutine.
260func (c *BadgerCache) Close() error {
261 c.closeOnce.Do(func() {
262 getCacheLogger().Debug("Closing Badger database")
263
264 if c.stopGC != nil {
265 close(c.stopGC)
266 }
267
268 if c.db != nil {
269 c.closeErr = c.db.Close()
270 }
271 })
272
273 return c.closeErr
274}

Calls 3

getCacheLoggerFunction · 0.85
DebugMethod · 0.65
CloseMethod · 0.65