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

Method Len

internal/cache/timeoutCache.go:147–151  ·  view source on GitHub ↗

Len returns the number of entries in the cache.

()

Source from the content-addressed store, hash-verified

145
146// Len returns the number of entries in the cache.
147func (c *TimeoutCache) Len() int {
148 c.mu.Lock()
149 defer c.mu.Unlock()
150 return len(c.cache)
151}

Callers 4

TestCacheExpireMethod · 0.95
TestCacheRemoveMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 4

TestCacheExpireMethod · 0.76
TestCacheRemoveMethod · 0.76