Skip to content

Commit

Permalink
Update cache.js
Browse files Browse the repository at this point in the history
  • Loading branch information
zazeblik authored Aug 31, 2018
1 parent 6dff8ad commit 07b5d68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function Cache() {
let selfCache = this;

this.set = function (key, ttl, result) {
//key = key.replace("+","");
key = key.replace("+","");
if (this.cache && this.cache[key] && this.cache[key]._timeOut)
clearTimeout(this.cache[key]._timeOut);

Expand All @@ -74,7 +74,7 @@ function Cache() {
this.set = this.set.bind(caching.store);

this.get = function(pattern, callback) {
pattern = pattern.replace("+","\\+");
pattern = pattern.replace("+","");
let self = this;
if (~pattern.indexOf('*')) {
pattern = new RegExp(pattern.replace(/\*/g, '.*'), 'g');
Expand Down

0 comments on commit 07b5d68

Please sign in to comment.