add config.performance.unfurlSrvCacheTtl option for caching resolveSrv calls

This commit is contained in:
Nick Krecklow
2020-05-08 16:53:48 -05:00
parent f6780e7a9b
commit 11d3031b6c
5 changed files with 74 additions and 27 deletions

View File

@ -34,6 +34,11 @@ if (config.performance && config.performance.skipUnfurlSrv) {
logger.log('warn', '"performance.skipUnfurlSrv" is enabled. Any configured hosts using SRV records may not properly resolve.')
}
if (!config.performance || typeof config.performance.unfurlSrvCacheTtl === 'undefined') {
logger.log('warn', '"performance.unfurlSrvCacheTtl" is not defined in config.json - defaulting to 120 seconds!')
config.performance.unfurlSrvCacheTtl = 2 * 60 * 1000
}
if (!config.logToDatabase) {
logger.log('warn', 'Database logging is not enabled. You can enable it by setting "logToDatabase" to true in config.json. This requires sqlite3 to be installed.')