Skip to content

Commit

Permalink
fix(config): add default for cache config
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 committed Apr 21, 2019
1 parent 2613667 commit 729b62d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,14 @@ func (c *Config) validateServer() error {
c.Server.QueueLen = 5
}

if c.Server.Cache.MaxCacheItemSize == 0 {
c.Server.Cache.MaxCacheItemSize = 50 * 1024
}

if c.Server.Cache.Type == "" {
c.Server.Cache.Type = "memory"
}

if c.Server.PlaceholderStr != "" {
buf, err := helpers.FetchObject(c.Server.PlaceholderStr)
if err != nil {
Expand Down

0 comments on commit 729b62d

Please # to comment.