From de98852da6a152a7c485ec9cd792a0740b06205a Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 21 Sep 2020 16:50:42 -0400 Subject: [PATCH] SessionStore: Delete unused methods `all`, `clear`, `length` --- src/node/db/SessionStore.js | 44 ------------------------------------- 1 file changed, 44 deletions(-) diff --git a/src/node/db/SessionStore.js b/src/node/db/SessionStore.js index 647cbbc8d..9803c5672 100644 --- a/src/node/db/SessionStore.js +++ b/src/node/db/SessionStore.js @@ -52,47 +52,3 @@ SessionStore.prototype.destroy = function(sid, fn) { process.nextTick(fn); } }; - -/* - * RPB: the following methods are optional requirements for a compatible session - * store for express-session, but in any case appear to depend on a - * non-existent feature of ueberdb2 - */ -if (db.forEach) { - SessionStore.prototype.all = function(fn) { - messageLogger.debug('ALL'); - - var sessions = []; - - db.forEach(function(key, value) { - if (key.substr(0,15) === "sessionstorage:") { - sessions.push(value); - } - }); - fn(null, sessions); - }; - - SessionStore.prototype.clear = function(fn) { - messageLogger.debug('CLEAR'); - - db.forEach(function(key, value) { - if (key.substr(0,15) === "sessionstorage:") { - db.remove("session:" + key); - } - }); - if (fn) fn(); - }; - - SessionStore.prototype.length = function(fn) { - messageLogger.debug('LENGTH'); - - var i = 0; - - db.forEach(function(key, value) { - if (key.substr(0,15) === "sessionstorage:") { - i++; - } - }); - fn(null, i); - } -};