From 07b5d685c1305dc12158de2d4724e220d10af7f0 Mon Sep 17 00:00:00 2001 From: zazeblik Date: Fri, 31 Aug 2018 15:25:06 +0300 Subject: [PATCH] Update cache.js --- cache.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache.js b/cache.js index 0cdc905..b0a4a26 100755 --- a/cache.js +++ b/cache.js @@ -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); @@ -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');