perf: cache content type's result (#1218)

master
Yiyu He 2018-07-11 17:49:25 +08:00 committed by fengmk2
parent 162a5b3e78
commit c6b8782553
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
const contentDisposition = require('content-disposition');
const ensureErrorHandler = require('error-inject');
const getType = require('mime-types').contentType;
const getType = require('cache-content-type');
const onFinish = require('on-finished');
const isJSON = require('koa-is-json');
const escape = require('escape-html');

View File

@ -23,6 +23,7 @@
"license": "MIT",
"dependencies": {
"accepts": "^1.2.2",
"cache-content-type": "^1.0.0",
"content-disposition": "~0.5.0",
"content-type": "^1.0.0",
"cookies": "~0.7.0",
@ -39,7 +40,6 @@
"koa-compose": "^4.0.0",
"koa-convert": "^1.2.0",
"koa-is-json": "^1.0.0",
"mime-types": "^2.0.7",
"on-finished": "^2.1.0",
"only": "0.0.2",
"parseurl": "^1.3.0",