MCPcopy Create free account
hub / github.com/AdRoll/baker / removeCold

Method removeCold

pkg/buffercache/location.go:50–60  ·  view source on GitHub ↗

removeCold removes all locations pointing to the given cold cache bucket.

(bidx int)

Source from the content-addressed store, hash-verified

48
49// removeCold removes all locations pointing to the given cold cache bucket.
50func (m *locationMap) removeCold(bidx int) {
51 for key, loc := range m.m {
52 if loc.isHot() {
53 continue
54 }
55
56 if bidx == loc.coldBucketIdx() {
57 delete(m.m, key)
58 }
59 }
60}
61
62// removeHot removes all locations pointing to the hot cache.
63func (m *locationMap) removeHot() {

Callers 1

putInColdMethod · 0.80

Calls 2

isHotMethod · 0.80
coldBucketIdxMethod · 0.80

Tested by

no test coverage detected