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

core.io-cache-redis

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core.io-cache-redis - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

29

lib/cacheBatch.js

@@ -73,2 +73,10 @@ const extend = require('gextend');

/**
* If all keys were found in
* the cache. Return values...
*/
if (notEmpty(cachedValues) === rawKeys.length) {
return cachedValues;
}
let values = [],

@@ -103,10 +111,2 @@ batchKeys = [],

/**
* Great! All keys were found in
* the cache. Return values...
*/
if (values.length === rawKeys.length) {
return values;
}
try {

@@ -138,2 +138,3 @@ /**

const setValues = [];
for (const i in batchValues) {

@@ -159,7 +160,10 @@ let value = batchValues[i];

*/
values[index] = value;
if (index) {
values[index] = value;
setValues.push(value);
}
}
try {
await this.setBatch(batchKeys, values, options);
await this.setBatch(batchKeys, setValues, options);
} catch (error) {

@@ -274,2 +278,7 @@ values = { $error: error };

return false;
}
function notEmpty(a = []) {
return a.filter(a => a != null).length;
}
{
"name": "core.io-cache-redis",
"version": "0.10.0",
"version": "0.11.0",
"description": "Redis cache module",

@@ -5,0 +5,0 @@ "main": "index.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