Skip to content

Commit

Permalink
fix hard coded cache limit
Browse files Browse the repository at this point in the history
  • Loading branch information
atakanozceviz authored Jan 10, 2020
1 parent d7df91c commit faf90d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func getQuery(expr string) (*xpath.Expr, error) {
return xpath.Compile(expr)
}
cacheOnce.Do(func() {
cache = lru.New(50)
cache = lru.New(SelectorCacheMaxEntries)
})
cacheMutex.RLock()
if v, ok := cache.Get(expr); ok {
Expand Down

0 comments on commit faf90d0

Please sign in to comment.