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

cartodb-redis

Package Overview
Dependencies
Maintainers
17
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cartodb-redis - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

16

lib/carto_metadata.js

@@ -363,2 +363,15 @@ /**

/**
* Things to know first:
* - We save the limits values in KEYS[1] list. Every limit has 3 values: burst, count and period (in seconds).
* - We could save several limits in the same list.
* - Example: 10 req/second (burst = 10) and 100 req/minute (burst = 50) ----> [10, 10 , 1, 50, 100, 60]
*
* Script explanation:
* - Extract limits values from KEYS[1] list
* - loop over limit values and call to redis cell every 3 values (3 values == 1 limit), saving the result in
* results variable (a lua table)
* - The key used by redis cell is the result of concatening KEYS[2], ":" and the limit index
* - Returns the result of every limit or an empty lua table if there aren't limits
*/
me.rateLimitLuaScript =

@@ -377,3 +390,4 @@ 'local results = {} ' +

' resultsCounter = resultsCounter + 1 ' +
' results[resultsCounter] = redis.call("CL.THROTTLE", KEYS[2], limits[1], limits[2], v) ' +
' local redisCellKey = KEYS[2] .. ":" .. i/3 ' +
' results[resultsCounter] = redis.call("CL.THROTTLE", redisCellKey, limits[1], limits[2], v) ' +
' end ' +

@@ -380,0 +394,0 @@ 'end ' +

2

package.json
{
"name": "cartodb-redis",
"version": "2.0.0",
"version": "2.0.1",
"main": "./lib/carto_metadata.js",

@@ -5,0 +5,0 @@ "description": "A Node.js based lib to interact with cartodb redis databases",

Sorry, the diff of this file is not supported yet

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