Skip to content

Commit

Permalink
Fixed cache bugs introduced by 1bc9a1a
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 29, 2010
1 parent 1bc9a1a commit 9ff2f81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/express/plugins/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ exports.Store.Memory = exports.Store.extend({
matches = {}
for (var i = 0, len = keys.length; i < len; ++i)
if (regexp.test(keys[i]))
matches[keys[i]] = this.data[keys[i]]
return matches
matches[keys[i]] = this.data[keys[i]].val
callback(matches)
},

/**
Expand All @@ -155,8 +155,8 @@ exports.Store.Memory = exports.Store.extend({
var regexp = this.normalize(key),
keys = Object.keys(this.data)
for (var i = 0, len = keys.length; i < len; ++i)
if (regexp.test(this.data[keys[i]]))
delete this.data[keys[i]]
if (regexp.test(keys[i]))
this.data[keys[i]] = null
}
callback()
},
Expand Down

0 comments on commit 9ff2f81

Please sign in to comment.