don't cache DNS names for so long, in order to deal with DNS changes. webid
authorHenry Story <henry.story@bblfish.net>
Tue, 24 Jan 2012 17:50:23 +0100
branchwebid
changeset 177 951fc773c9be
parent 176 f3d715ac5b30
child 178 27674711ebe9
don't cache DNS names for so long, in order to deal with DNS changes.
src/main/scala/ReadWriteWebMain.scala
--- a/src/main/scala/ReadWriteWebMain.scala	Tue Jan 24 17:49:38 2012 +0100
+++ b/src/main/scala/ReadWriteWebMain.scala	Tue Jan 24 17:50:23 2012 +0100
@@ -20,6 +20,11 @@
 trait ReadWriteWebArgs {
   val logger: Logger = LoggerFactory.getLogger(this.getClass)
 
+  // in Order to be receptive to DNS changes the DNS cache must be set
+  java.security.Security.setProperty("networkaddress.cache.ttl" , ""+60*10); //3 minutes
+  java.security.Security.setProperty("networkaddress.cache.negative.ttl",""+60*3)
+
+
   val postUsageMsg= Some("""
   |PROPERTIES
   |