Socket
Socket
Sign inDemoInstall

rosmaro-redis-storage

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rosmaro-redis-storage

Redis backed storage for Rosmaro.


Version published
Maintainers
1
Install size
5.15 kB
Created

Readme

Source

Redis backed storage for Rosmaro

This package makes it possible to store Rosmaro data in Redis.

Installation

$ npm i rosmaro-redis-storage --save

Building a storage

First you will need a Redis client. For details on how to get it please check the documentation of the redis package.

Then you can build a storage like this:

const make_redis_backed_storage = require('rosmaro-redis-storage')

const redis_backed_storage = make_redis_backed_storage({
  redis_client: the_redis_client_to_use,
  key: all_the_data_is_stored_under_this_redis_key
})

The ttl option makes it possible to set the time to live of the stored data:

const redis_backed_storage = make_redis_backed_storage({
  redis_client,
  key,
  ttl: 500 //milliseconds
})

The key parameter

Please note that the provided key is used as it is, without any changes. So if you already have something stored under this key, it's going to be overriden. A situation like that may occur if you use the rosmaro-redlock package and provide the same value as the resource parameter.

Keywords

FAQs

Last updated on 21 May 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc