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

@tirke/node-cache-manager-ioredis

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tirke/node-cache-manager-ioredis

This is a rewrite of [dabroek/node-cache-manager-ioredis](https://github.com/dabroek/node-cache-manager-ioredis). It uses TypeScript with updated dependencies and missing features added. It aims to provide **the most simple wrapper possible** by just pass

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by1.28%
Maintainers
1
Weekly downloads
 
Created
Source

IORedis store for node cache manager

This is a rewrite of dabroek/node-cache-manager-ioredis. It uses TypeScript with updated dependencies and missing features added. It aims to provide the most simple wrapper possible by just passing the configuration to the underlying ioredis package.

Installation

npm install @tirke/cache-manager-ioredis
yarn add @tirke/cache-manager-ioredis
pnpm add @tirke/cache-manager-ioredis

Usage Examples

Using promises

import RedisStore, { Store } from '@tirke/cache-manager-ioredis'
import { caching } from 'cache-manager'

const redisCache = caching({
  store: RedisStore,
  host: 'localhost', // default value
  port: 6379, // default value
  password: 'XXXXX',
  db: 0,
  ttl: 600,
})

// listen for redis connection error event
const cache = redisCache.store as Store
const redisClient = cache.getClient();
redisClient.on('error', (error: unknown) => {
  // handle error here
  console.log(error)
})

await redisCache.set('foo', 'bar', { ttl: 5 })
const result = await redisCache.get('foo')
await redisCache.del('foo')

FAQs

Package last updated on 08 Aug 2022

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