in-memory lru cache of limited capacity
fix memLimit flag usage use megabytes as a unit for memory store capacity fix incorrect item rearrangement in lru cache use latest 1.x Go on trais
This commit is contained in:
committed by
Serge Zaitsev
parent
6d38ab6363
commit
1411b19ad2
@@ -73,9 +73,9 @@ func Git(prefix string, auth string) Option {
|
||||
}
|
||||
|
||||
// Memory configures API to use in-memory cache for downloaded modules.
|
||||
func Memory() Option {
|
||||
func Memory(log logger, limit int64) Option {
|
||||
return func(api *api) {
|
||||
api.stores = append(api.stores, store.Memory())
|
||||
api.stores = append(api.stores, store.Memory(log, limit))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user