* dnsfilter: use golibs/cache

+ config: add cache size settings
+ config: add cache_time setting
This commit is contained in:
Simon Zolin
2019-08-22 15:09:43 +03:00
parent 7d3fe71597
commit c616259e8b
5 changed files with 85 additions and 38 deletions

View File

@@ -211,6 +211,12 @@ func initConfig() {
// also change the default config
config.DNS.UpstreamDNS = defaultDNS
}
config.DNS.CacheSize = 4 * 1024 * 1024
config.DNS.SafeBrowsingCacheSize = 1 * 1024 * 1024
config.DNS.SafeSearchCacheSize = 1 * 1024 * 1024
config.DNS.ParentalCacheSize = 1 * 1024 * 1024
config.DNS.CacheTime = 30
}
// getConfigFilename returns path to the current config file