MCPcopy
hub / github.com/go-gorm/gorm / removeFromBucket

Method removeFromBucket

internal/lru/lru.go:352–354  ·  view source on GitHub ↗

removeFromBucket removes the entry from its corresponding bucket. Has to be called with lock!

(e *Entry[K, V])

Source from the content-addressed store, hash-verified

350
351// removeFromBucket removes the entry from its corresponding bucket. Has to be called with lock!
352func (c *LRU[K, V]) removeFromBucket(e *Entry[K, V]) {
353 delete(c.buckets[e.ExpireBucket].entries, e.Key)
354}
355
356// Cap returns the capacity of the cache
357func (c *LRU[K, V]) Cap() int {

Callers 2

AddMethod · 0.95
removeElementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected