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

cache-service-cache-module

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-service-cache-module - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

README.md

19

cacheModule.js

@@ -85,3 +85,3 @@ /**

var exp = (expiration) ? (expiration * 1000) : self.defaultExpiration;
cache.expirations[key] = Date.now() + expiration;
cache.expirations[key] = Date.now() + exp;
cache.db[key] = value;

@@ -124,8 +124,15 @@ if(cb) cb();

log(false, 'Attempting to delete keys:', {keys: keys});
for(var i = 0; i < keys.length; i++){
var key = keys[i];
cache.db[key] = undefined;
cache.expirations[key] = undefined;
if(typeof keys === 'object'){
for(var i = 0; i < keys.length; i++){
var key = keys[i];
cache.db[key] = undefined;
cache.expirations[key] = undefined;
}
if(cb) cb(null, keys.length);
}
if(cb) cb();
else{
cache.db[keys] = undefined;
cache.expirations[keys] = undefined;
if(cb) cb(null, 1);
}
}

@@ -132,0 +139,0 @@

{
"name": "cache-service-cache-module",
"version": "0.1.0",
"version": "1.0.0",
"description": "A cache plugin for cache-service.",

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

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