aboutsummaryrefslogtreecommitdiff
path: root/internal/lru/len.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/lru/len.go')
-rw-r--r--internal/lru/len.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/lru/len.go b/internal/lru/len.go
new file mode 100644
index 00000000..bc05e362
--- /dev/null
+++ b/internal/lru/len.go
@@ -0,0 +1,6 @@
+package lru
+
+// Len returns the number of cached entries.
+func (cache *Cache[K, V]) Len() int {
+ return len(cache.items)
+}