memcache-plus
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -46,3 +46,4 @@ /** | ||
netTimeout: 500, | ||
backoffLimit: 10000 | ||
backoffLimit: 10000, | ||
maxValueSize: 1048576 | ||
}); | ||
@@ -143,3 +144,4 @@ | ||
}, | ||
onError: this.onNetError | ||
onError: this.onNetError, | ||
maxValueSize: this.maxValueSize | ||
}); | ||
@@ -146,0 +148,0 @@ }, this); |
@@ -34,3 +34,4 @@ /** | ||
port: '11211', | ||
reconnect: true | ||
reconnect: true, | ||
maxValueSize: 1048576 | ||
}); | ||
@@ -58,2 +59,3 @@ | ||
this.backoff = opts.backoff || 10; | ||
this.maxValueSize = opts.maxValueSize; | ||
@@ -256,2 +258,3 @@ this.connect(); | ||
Connection.prototype.set = function(key, val, ttl) { | ||
var self = this; | ||
debug('set %s:%s', key, val); | ||
@@ -304,4 +307,4 @@ assert(typeof key === 'string', 'Cannot set in memcache with a not string key'); | ||
} | ||
if (v.length > 1048576) { | ||
throw new Error('Value too large to set in memcache'); | ||
if (v.length > self.maxValueSize) { | ||
throw new Error(util.format('Value too large to set in memcache: %s > %s', v.length, self.maxValueSize)); | ||
} | ||
@@ -308,0 +311,0 @@ |
{ | ||
"name": "memcache-plus", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Better memcache for node", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
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
56256
1340