MCPcopy
hub / github.com/benbjohnson/litestream / invalidatePosCache

Method invalidatePosCache

db.go:595–599  ·  view source on GitHub ↗

invalidatePosCache clears the cached position so the next call to Pos() recomputes it from disk. Call this when L0 LTX files are deleted or when the L0 directory is cleared.

()

Source from the content-addressed store, hash-verified

593// recomputes it from disk. Call this when L0 LTX files are deleted or
594// when the L0 directory is cleared.
595func (db *DB) invalidatePosCache() {
596 db.pos.Lock()
597 db.pos.value = nil
598 db.pos.Unlock()
599}
600
601// Notify returns a channel that closes when the shadow WAL changes.
602func (db *DB) Notify() <-chan struct{} {

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45