MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / ResetCache

Method ResetCache

consistent/consistent.go:222–228  ·  view source on GitHub ↗

ResetCache removes all node from the hash cache.

()

Source from the content-addressed store, hash-verified

220
221// ResetCache removes all node from the hash cache.
222func (c *Consistent) ResetCache() {
223 c.cacheLock.Lock()
224 defer c.cacheLock.Unlock()
225
226 c.circle = make(map[proto.NodeKey]*proto.Node)
227 c.sortedHashes = NodeKeys{}
228}
229
230// GetNeighbor returns an node close to where name hashes to in the circle.
231func (c *Consistent) GetNeighbor(name string) (proto.Node, error) {

Callers 1

SetMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected