implement and use striped LRU cache to lower mutex contention (#15764)
* Implement Striped LRU cache * ci * fix Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
96d76760f0
Коммит
349b83f23a
@@ -62,7 +62,11 @@ func setupTestHelper(dbStore store.Store, enterprise bool, includeCacheLayer boo
|
||||
options = append(options, app.ConfigStore(memoryStore))
|
||||
if includeCacheLayer {
|
||||
options = append(options, app.StoreOverride(func(s *app.Server) store.Store {
|
||||
return localcachelayer.NewLocalCacheLayer(dbStore, s.Metrics, s.Cluster, s.CacheProvider)
|
||||
lcl, err2 := localcachelayer.NewLocalCacheLayer(dbStore, s.Metrics, s.Cluster, s.CacheProvider)
|
||||
if err2 != nil {
|
||||
panic(err2)
|
||||
}
|
||||
return lcl
|
||||
}))
|
||||
} else {
|
||||
options = append(options, app.StoreOverride(dbStore))
|
||||
|
||||
Ссылка в новой задаче
Block a user