This commit is contained in:
ryan
2026-07-13 15:17:45 +08:00
parent 08e61ce833
commit e0eb4e5975
334 changed files with 17212 additions and 12321 deletions
+1 -1
View File
@@ -70,4 +70,4 @@ func (c *Cache[K, V]) InvalidateAll() {
// EstimatedSize returns the approximate number of cached entries.
func (c *Cache[K, V]) EstimatedSize() int {
return c.inner.EstimatedSize()
}
}
+1 -1
View File
@@ -35,4 +35,4 @@ func TestCacheInvalidateAll(t *testing.T) {
if cache.EstimatedSize() != 0 {
t.Fatalf("EstimatedSize() after InvalidateAll = %d, want 0", cache.EstimatedSize())
}
}
}
+2 -2
View File
@@ -35,8 +35,8 @@ type Loader interface {
}
type cacheEntry struct {
item CacheItem
expireAt time.Time
item CacheItem
expireAt time.Time
}
func init() {