connect-memjs
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -30,3 +30,3 @@ /*! | ||
* Return the `MemcachedStore` extending `connect`'s session Store. | ||
* | ||
* | ||
* @param {object} connect | ||
@@ -53,4 +53,2 @@ * @return {Function} | ||
function MemcachedStore(options) { | ||
var log = console.log; | ||
options = options || {}; | ||
@@ -72,3 +70,6 @@ Store.call(this, options); | ||
options.client = memjs.Client.create(servers, options); | ||
log("memjs initialized for servers: " + servers); | ||
if (this.debug) { | ||
debug("memjs initialized for servers: " + servers); | ||
} | ||
} | ||
@@ -79,3 +80,3 @@ | ||
//this.client.on("issue", function(issue) { | ||
// log("memjs::Issue @ " + issue.server + ": " + | ||
// log("memjs::Issue @ " + issue.server + ": " + | ||
// issue.messages + ", " + issue.retries + " attempts left"); | ||
@@ -100,3 +101,3 @@ //}); | ||
* Translates the given `sid` into a memcached key, optionally with prefix. | ||
* | ||
* | ||
* @param {String} sid | ||
@@ -111,3 +112,3 @@ * @api private | ||
* Attempt to fetch session by the given `sid`. | ||
* | ||
* | ||
* @param {String} sid | ||
@@ -164,5 +165,5 @@ * @param {Function} fn | ||
this.client.set(sid, sess, function() { | ||
this.client.set(sid, sess, { expires: ttl }, function() { | ||
fn && fn.apply(this, arguments); | ||
}, ttl); | ||
}); | ||
}; | ||
@@ -172,3 +173,3 @@ | ||
* Destroy the session associated with the given `sid`. | ||
* | ||
* | ||
* @param {String} sid | ||
@@ -198,6 +199,6 @@ * @api public | ||
* Clear all sessions. | ||
* | ||
* | ||
* @param {Function} fn | ||
* @api public | ||
*/ | ||
*/ | ||
@@ -204,0 +205,0 @@ MemcachedStore.prototype.clear = function(fn) { |
{ | ||
"name": "connect-memjs", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Memcached session store for Connect backed by memjs", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"debug": "^2.6.3", | ||
"memjs": ">= 0.9.0" | ||
"memjs": ">= 1.0.0-rc.1" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9048
5
161
1
Updatedmemjs@>= 1.0.0-rc.1