Skip to content

Commit

Permalink
fix(middleware): fix variables shadowing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed Feb 10, 2016
1 parent 4822a49 commit 45dd709
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ function cache (config = {}) {

const store = config.store
const key = config.key || cache.key
const read = config.readCache || readCache
const serialize = config.serialize || serialize

config.readCache = config.readCache || readCache
config.serialize = config.serialize || serialize

return (req, next, service) => {
const useCache = !service.use || (service.use && (service.use.cache !== false))
Expand Down

0 comments on commit 45dd709

Please sign in to comment.