Less aggressive chunk cache invalidation for --tail

This commit is contained in:
Junegunn Choi
2024-06-10 20:30:19 +09:00
parent dfee7af57b
commit 7fc13c5cfd
7 changed files with 32 additions and 17 deletions

View File

@@ -11,7 +11,7 @@ func TestChunkList(t *testing.T) {
// FIXME global
sortCriteria = []criterion{byScore, byLength}
cl := NewChunkList(func(item *Item, s []byte) bool {
cl := NewChunkList(NewChunkCache(), func(item *Item, s []byte) bool {
item.text = util.ToChars(s)
return true
})
@@ -80,7 +80,7 @@ func TestChunkList(t *testing.T) {
}
func TestChunkListTail(t *testing.T) {
cl := NewChunkList(func(item *Item, s []byte) bool {
cl := NewChunkList(NewChunkCache(), func(item *Item, s []byte) bool {
item.text = util.ToChars(s)
return true
})