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

Method Len

internal/lru/lru.go:268–272  ·  view source on GitHub ↗

Len returns the number of items in the cache.

()

Source from the content-addressed store, hash-verified

266
267// Len returns the number of items in the cache.
268func (c *LRU[K, V]) Len() int {
269 c.mu.RLock()
270 defer c.mu.RUnlock()
271 return c.evictList.Length()
272}
273
274// Resize changes the cache size. Size of 0 means unlimited.
275func (c *LRU[K, V]) Resize(size int) (evicted int) {

Callers 15

ScanFunction · 0.80
AddVarMethod · 0.80
BuildConditionMethod · 0.80
cloneMethod · 0.80
SetColumnMethod · 0.80
ExecuteMethod · 0.80
CreateInBatchesMethod · 0.80
FindInBatchesMethod · 0.80
ModifyStatementMethod · 0.80
ModifyStatementMethod · 0.80
BuildMethod · 0.80
ReplaceMethod · 0.80

Calls 1

LengthMethod · 0.65

Tested by 8

TestChainableAPIFunction · 0.64
TestLRUNoPurgeFunction · 0.64
TestLRUWithPurgeFunction · 0.64
TestLRUConcurrencyFunction · 0.64
TestLoadingExpiredFunction · 0.64
TestLRURemoveOldestFunction · 0.64
assertCallbacksFunction · 0.64