Socket
Socket
Sign inDemoInstall

lru-cache-for-clusters-as-promised

Package Overview
Dependencies
8
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.0 to 1.6.1

5

CHANGELOG.md

@@ -0,1 +1,6 @@

1.6.1 / 2021-03-20
==================
* Update types
1.6.0 / 2021-03-20

@@ -2,0 +7,0 @@ ==================

12

index.d.ts

@@ -13,2 +13,5 @@ // https://github.com/doublesharp/lru-cache-for-clusters-as-promised#lru-cache-for-clusters-as-promised

// Sets a value for a key. Specifying the maxAge will cause the value to expire per the stale value or when pruned.
setObject(key: string, object: Object, maxAge?: number): Promise<void>
// Sets multiple key-value pairs in the cache at one time.

@@ -23,2 +26,5 @@ mSet(keys: { [index: string]: string | number }, maxAge?: number): Promise<void>

// Returns a value for a key.
getObject(key: string): Promise<Object>
// Returns values for multiple keys, results are in the form of { key1: '1', key2: '2' }.

@@ -103,3 +109,7 @@ mGet(keys: Array<string>): Promise<{ [index: string]: string | number }>

// Use a cron job on the master thread to call prune() on your cache at regular intervals specified in "crontime", for example "*/30 * * * * *" would prune the cache every 30 seconds. Also works in single threaded environments not using the cluster module.
prune?: false | string
prune?: false | string,
// custom stringify function
stringify?: function,
// custom parse function
parse?: function,
}

@@ -106,0 +116,0 @@

2

package.json
{
"name": "lru-cache-for-clusters-as-promised",
"version": "1.6.0",
"version": "1.6.1",
"types": "index.d.ts",

@@ -5,0 +5,0 @@ "description": "LRU Cache that is safe for clusters",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc