Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go 1.23.0

require (
github.com/elastic/go-freelru v0.16.0
github.com/goware/cachestore2 v0.12.2
github.com/goware/cachestore2 v0.12.3-0.20250429120429-c2efd1eab852
github.com/goware/singleflight v0.3.0
github.com/stretchr/testify v1.10.0
github.com/zeebo/xxh3 v1.0.2
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ github.com/elastic/go-freelru v0.16.0 h1:gG2HJ1WXN2tNl5/p40JS/l59HjvjRhjyAa+oFTR
github.com/elastic/go-freelru v0.16.0/go.mod h1:bSdWT4M0lW79K8QbX6XY2heQYSCqD7THoYf82pT/H3I=
github.com/goware/cachestore2 v0.12.2 h1:04YGXkMwbH1xe82siCO7iaPhetntRABN5fWhBKEzduY=
github.com/goware/cachestore2 v0.12.2/go.mod h1:PR+lXK8UXa/wjKB7mpIj6HtRhC7vbcRXx4b5F1Av/ik=
github.com/goware/cachestore2 v0.12.3-0.20250429112124-a0c10fa4dbe0 h1:J7pzNWhan4fKuTtzmVKcrw9tgucRAQA28ySSz7P8fl4=
github.com/goware/cachestore2 v0.12.3-0.20250429112124-a0c10fa4dbe0/go.mod h1:PR+lXK8UXa/wjKB7mpIj6HtRhC7vbcRXx4b5F1Av/ik=
github.com/goware/cachestore2 v0.12.3-0.20250429120429-c2efd1eab852 h1:Zwvy8fedttiqeUmjEwRZz+2wSK4cbLOdLSMZXzH4RIE=
github.com/goware/cachestore2 v0.12.3-0.20250429120429-c2efd1eab852/go.mod h1:PR+lXK8UXa/wjKB7mpIj6HtRhC7vbcRXx4b5F1Av/ik=
github.com/goware/singleflight v0.3.0 h1:b+OM844fuHzanOlE84WeI+G8YMksUY636v0bdcAfnHE=
github.com/goware/singleflight v0.3.0/go.mod h1:vcmu9KY0BS9WbA3Pn+WOdUQlwT1CPZJm1Fgaz2l88Dc=
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
Expand Down
4 changes: 4 additions & 0 deletions memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func (m *MemLRU[V]) Options() cachestore.StoreOptions {
return m.options
}

func (m *MemLRU[V]) BackendType() cachestore.BackendType {
return cachestore.BackendTypeAny
}

func (m *MemLRU[V]) Exists(ctx context.Context, key string) (bool, error) {
_, exists := m.lru.Peek(key)
return exists, nil
Expand Down