Skip to content

Commit 64454cf

Browse files
committed
vendor: add golang-lru to dependencies
Signed-off-by: Miguel Molina <[email protected]>
1 parent b31a601 commit 64454cf

File tree

15 files changed

+2302
-3
lines changed

15 files changed

+2302
-3
lines changed

Gopkg.lock

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/function/history_idx.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ import (
1717
// of another commit.
1818
type HistoryIdx struct {
1919
expression.BinaryExpression
20-
cache *lru.ARCCache
20+
cache *lru.TwoQueueCache
2121
}
2222

2323
const historyIdxCacheSize = 300
2424

2525
// NewHistoryIdx creates a new HistoryIdx udf.
2626
func NewHistoryIdx(start, target sql.Expression) sql.Expression {
27-
cache, _ := lru.NewARC(historyIdxCacheSize)
27+
cache, _ := lru.New2Q(historyIdxCacheSize)
2828
return &HistoryIdx{expression.BinaryExpression{Left: start, Right: target}, cache}
2929
}
3030

vendor/github.com/hashicorp/golang-lru/.gitignore

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/hashicorp/golang-lru/2q.go

Lines changed: 223 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)