aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/highlight/highlight.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/highlight/highlight.go b/modules/highlight/highlight.go
index e22e9d5b32..568035fbb7 100644
--- a/modules/highlight/highlight.go
+++ b/modules/highlight/highlight.go
@@ -33,7 +33,7 @@ var (
once sync.Once
- cache *lru.ARCCache
+ cache *lru.TwoQueueCache
)
// NewContext loads custom highlight map from local config
@@ -45,7 +45,7 @@ func NewContext() {
}
// The size 512 is simply a conservative rule of thumb
- c, err := lru.NewARC(512)
+ c, err := lru.New2Q(512)
if err != nil {
panic(fmt.Sprintf("failed to initialize LRU cache for highlighter: %s", err))
}