Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func ExampleWithReferenceCount() {
c.Set("b", 2)
c.Set("c", 3)

// evicted becauce the lowest reference count.
// evicted because the lowest reference count.
gotb, bok := c.Get("b")
fmt.Println(gotb, bok)

Expand Down
2 changes: 1 addition & 1 deletion policy/clock/clock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestSet(t *testing.T) {
t.Fatalf("invalid replacing value bar %d, cachehit %v", bar, ok)
}

t.Run("with initilal reference count", func(t *testing.T) {
t.Run("with initial reference count", func(t *testing.T) {
cache := clock.NewCache[string, *tmp](clock.WithCapacity(2))
cache.Set("foo", &tmp{i: 10}) // the highest reference count
cache.Set("foo2", &tmp{i: 2}) // expected eviction
Expand Down
2 changes: 1 addition & 1 deletion policy/lfu/lfu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestSet(t *testing.T) {
t.Fatalf("invalid replacing value bar %d, cachehit %v", bar, ok)
}

t.Run("with initilal reference count", func(t *testing.T) {
t.Run("with initial reference count", func(t *testing.T) {
cache := lfu.NewCache[string, *tmp](lfu.WithCapacity(2))
cache.Set("foo", &tmp{i: 10}) // the highest reference count
cache.Set("foo2", &tmp{i: 2}) // expected eviction
Expand Down