Skip to content

Commit 8bb6362

Browse files
committed
Replace ARCCache with TwoQueueCache to avoid patent issue
1 parent 71c5a8f commit 8bb6362

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/highlight/highlight.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var (
3333

3434
once sync.Once
3535

36-
cache *lru.ARCCache
36+
cache *lru.TwoQueueCache
3737
)
3838

3939
// NewContext loads custom highlight map from local config
@@ -45,7 +45,7 @@ func NewContext() {
4545
}
4646

4747
// The size 512 is simply a conservative rule of thumb
48-
c, err := lru.NewARC(512)
48+
c, err := lru.New2Q(512)
4949
if err != nil {
5050
panic(fmt.Sprintf("failed to initialize LRU cache for highlighter: %s", err))
5151
}

0 commit comments

Comments
 (0)