We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cce5f25 commit ba13753Copy full SHA for ba13753
1 file changed
lib/router/sequential.js
@@ -25,8 +25,8 @@ module.exports = (config = {}) => {
25
}
26
27
const routers = {}
28
- const hasCache = config.cacheSize > 0
29
- const cache = hasCache ? new LRU(config.cacheSize) : null
+ const isCacheEnabled = config.cacheSize > 0
+ const cache = isCacheEnabled ? new LRU(config.cacheSize) : null
30
const router = new Trouter()
31
router.id = config.id
32
@@ -59,7 +59,7 @@ module.exports = (config = {}) => {
59
queryparams(req, req.url)
60
61
let match
62
- if (hasCache) {
+ if (isCacheEnabled) {
63
const reqCacheKey = req.method + req.path
64
match = cache.get(reqCacheKey)
65
if (!match) {
0 commit comments