lazily load the geoIP service
This commit is contained in:
parent
b192b0c048
commit
c46e52d7f0
|
@ -9,7 +9,7 @@ import lila.common.IpAddress
|
|||
|
||||
final class GeoIP(config: GeoIP.Config) {
|
||||
|
||||
private val geoIp = MaxMindIpGeo(config.file, 0)
|
||||
private lazy val geoIp = MaxMindIpGeo(config.file, 0)
|
||||
|
||||
private val cache: LoadingCache[IpAddress, Option[Location]] = Scaffeine()
|
||||
.expireAfterAccess(config.cacheTtl)
|
||||
|
|
Loading…
Reference in a new issue