Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

memcache-plus

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memcache-plus - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

7

lib/connection.js

@@ -304,4 +304,11 @@ /**

if (ttl > 0) {
// We use ceil() here because we need the result to be greater than
// 0 since 0 means no expiration.
ttl = Math.ceil(ttl/1000);
}
// First send the metadata for this request
this.write(util.format('set %s 0 %d %d', key, ttl, v.length));
// Then the actual value

@@ -308,0 +315,0 @@ this.write(v);

2

package.json
{
"name": "memcache-plus",
"version": "0.1.9",
"version": "0.1.10",
"description": "Better memcache for node",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -429,2 +429,23 @@ require('chai').should();

});
describe('works with expiration', function() {
it('expires', function() {
var key = getKey(), val = chance.word();
return cache.set(key, val, 500)
.then(function() {
return cache.get(key);
})
.then(function(v) {
val.should.equal(v);
})
.delay(1000)
.then(function() {
return cache.get(key);
})
.then(function(v) {
expect(v).to.be.null;
});
});
});
});

@@ -431,0 +452,0 @@ // @todo should have cleanup jobs to delete keys we set in memcache

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc