🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@next-boost/redis-cache

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@next-boost/redis-cache

Official redis cache for next-boost

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

Coverage Status Maintainability

redis-cache

A redis-based cache for next-boost. If you have a cluster of next-boost running, using this plugin to share the cache between instances.

npm i @next-boost/redis-cache

Usage

// in .next-boost.js
const RedisCache = require('@next-boost/redis-cache/dist/adapter').default

module.exports = {
  cacheAdapter: RedisCache.init({
    uri: 'redis://<your-host>/<db>',
    ttl: 15,
    tbd: 3600,
  }),
  rules: [
    ...
  ],
}

Passing your own Redis Client

You can also provide an ioredis client or or cluster instance if you need advanced configuration

cacheAdapter: RedisCache.init({
    redis: new Redis.Cluster({...}),
    ttl: 15,
    tbd: 3600,
})

License

MIT. Copyright 2020, Rakuraku Jyo.

Keywords

redis-cache

FAQs

Package last updated on 08 Mar 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