Skip to content

Commit

Permalink
proxy: imp cache tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Nov 24, 2021
1 parent c0202b6 commit 25f966c
Show file tree
Hide file tree
Showing 2 changed files with 420 additions and 411 deletions.
10 changes: 5 additions & 5 deletions proxy/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,15 @@ func (c *cache) initLazyWithSubnet() {

// createCache returns new Cache with predefined settings.
func (c *cache) createCache() (glc glcache.Cache) {
maxSize := defaultCacheSize
if c.cacheSize > 0 {
maxSize = c.cacheSize
}
conf := glcache.Config{
MaxSize: uint(maxSize),
MaxSize: defaultCacheSize,
EnableLRU: true,
}

if c.cacheSize > 0 {
conf.MaxSize = uint(c.cacheSize)
}

return glcache.New(conf)
}

Expand Down
Loading

0 comments on commit 25f966c

Please sign in to comment.