mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-16 13:17:19 +02:00
cmd/ctrld: add default value and CLI flag for cache size
This commit is contained in:
committed by
Cuong Manh Le
parent
b93970ccfd
commit
e6d77e2586
@@ -20,6 +20,7 @@ var (
|
||||
secondaryUpstream string
|
||||
domains []string
|
||||
logPath string
|
||||
cacheSize int
|
||||
cfg ctrld.Config
|
||||
verbose int
|
||||
|
||||
@@ -75,3 +76,12 @@ func initLogging() {
|
||||
}
|
||||
zerolog.SetGlobalLevel(level)
|
||||
}
|
||||
|
||||
func initCache() {
|
||||
if !cfg.Service.CacheEnable {
|
||||
return
|
||||
}
|
||||
if cfg.Service.CacheSize == 0 {
|
||||
cfg.Service.CacheSize = 4096
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user