Authored by 周少峰

use dns cache

@@ -30,6 +30,7 @@ const fp = require('lodash/fp'); @@ -30,6 +30,7 @@ const fp = require('lodash/fp');
30 const pkg = require('./package.json'); 30 const pkg = require('./package.json');
31 const app = express(); 31 const app = express();
32 const helpers = global.yoho.helpers; 32 const helpers = global.yoho.helpers;
  33 +require('dnscache')({enable: true, ttl: 300, cachesize: 1000});
33 34
34 app.disable('x-powered-by'); 35 app.disable('x-powered-by');
35 36
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
32 "connect-multiparty": "^2.0.0", 32 "connect-multiparty": "^2.0.0",
33 "cookie-parser": "^1.4.3", 33 "cookie-parser": "^1.4.3",
34 "csurf": "^1.9.0", 34 "csurf": "^1.9.0",
  35 + "dnscache": "^1.0.1",
35 "express": "^4.13.1", 36 "express": "^4.13.1",
36 "handlebars": "4.0.5", 37 "handlebars": "4.0.5",
37 "lodash": "^4.13.1", 38 "lodash": "^4.13.1",