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

@dealerslink/node-object-key-cache

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dealerslink/node-object-key-cache

A Promise-based, object-key, cache extension for Redis and MemoryCache.

  • 1.1.2
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by433.33%
Maintainers
2
Weekly downloads
 
Created
Source

node-object-key-cache

node-object-key-cache is a promise-based, object-key, cache extension for the Redis and memory-cache modules.

Object Key Cache provides the ability to use JavaScript Objects as keys values when committing to cache.

During connection to Redis, it defaults to fail-back to the memory cache when when connecting to Redis fails.

Object Keys that are passed into the associated "O"-functions (e.g. oget, oset, etc.) are JSON stringified and then SHA256 hashed in an attempt to preserve the uniqueness of the key. Note: No additional mitigation of potential collision of key spaces with SHA256 is being performed. With one billion messages there is approximately a 1 in 4.3 x 1060 chance with SHA256 that two separate strings will generate an identical hash. The probability is negligible for most use cases; however, if very, very large numbers of keys are likely to be stored then consideration should be given to name-spacing or segregating data by how it will be used within the cache to avoid any potential for collisions.

Installation

npm install @dealerslink/node-object-key-cache

Usage

const ObjectKeyCache = require('@dealerslink/node-object-key-cache');
const objKeyCache = new ObjectKeyCache();

See wiki for more details.

FAQs

Package last updated on 01 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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