Skip to content

Commit

Permalink
update dependencies and README (#16)
Browse files Browse the repository at this point in the history
* update dependencies and README

* update deps
  • Loading branch information
evanshortiss committed Apr 20, 2018
1 parent ea25ef3 commit d5243cd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,9 @@

Dates are YYYY-MM-DD.

## 3.3.0 / 2017-04-02
* Update signature of `genCacheKey(req)` to `genCacheKey(req, res)`

## 3.2.1 / 2017-12-01
* Update to use expeditious@1.0.1 internally.
* Use `standard` module for linting.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -416,12 +416,13 @@ const cache = expressExpeditious({
namespace: 'mycache',

// cache key is based on a session id, api version, method, and url
genCacheKey: function (req) {
genCacheKey: function (req, res) {
const sessionId = req.session.id;
const version = req.headers['x-api-version'];
const resource = req.originalUrl;
const method = req.method;

// Could also use res to access etag etc.
return `${method}-${resource}-${version}-${sessionId}`;
}
});
Expand Down
8 changes: 4 additions & 4 deletions benchmark/index.js
Expand Up @@ -60,7 +60,7 @@ require('./server.js')
})
.run()
})
.catch((err) => {
console.log(err)
process.exit(1)
})
.catch((err) => {
console.log(err)
process.exit(1)
})
39 changes: 20 additions & 19 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "express-expeditious",
"version": "3.2.1",
"version": "3.3.0",
"description": "express caching middlware",
"main": "lib/middleware.js",
"files": [
Expand Down Expand Up @@ -43,41 +43,42 @@
"cacher",
"middleware",
"typescript",
"ts"
"ts",
"api"
],
"author": "Evan Shortiss",
"license": "MIT",
"dependencies": {
"debug": "~2.2.0",
"debug": "~3.1.0",
"expeditious": "~1.0.1",
"expeditious-engine-memory": "~0.2.0",
"http-parser-js": "~0.4.4",
"on-finished": "~2.3.0",
"timestring": "~4.0.0",
"verror": "~1.8.1"
"timestring": "~5.0.0",
"verror": "~1.10.0"
},
"devDependencies": {
"@types/express": "~4.0.36",
"async": "~2.0.1",
"@types/express": "~4.11.1",
"async": "~2.6.0",
"benchmark": "~2.1.4",
"bluebird": "~3.5.0",
"chai": "~3.5.0",
"coveralls": "~2.13.0",
"eslint": "~3.19.0",
"express": "~4.14.0",
"chai": "~4.1.2",
"coveralls": "~3.0.0",
"eslint": "~4.19.1",
"express": "~4.16.3",
"linelint": "~1.0.0",
"mocha": "~2.5.3",
"mocha": "~5.0.5",
"mocha-lcov-reporter": "~1.3.0",
"mongodb": "~2.2.26",
"nyc": "~6.6.1",
"proxyquire": "~1.7.9",
"mongodb": "~3.0.5",
"nyc": "~11.6.0",
"proxyquire": "~2.0.1",
"pug": "~2.0.0-rc.1",
"request": "~2.72.0",
"request": "~2.85.0",
"require-uncached": "~1.0.3",
"sinon": "~1.17.4",
"standard": "~10.0.3",
"sinon": "~4.5.0",
"standard": "~11.0.1",
"supertest": "~3.0.0",
"typescript": "~2.4.1"
"typescript": "~2.8.1"
},
"engines": {
"node": ">=4.4.2"
Expand Down

0 comments on commit d5243cd

Please sign in to comment.