catbox-redis

Redis adapter for catbox.

Latest Version: 7.0.2
hapi-family
Installation:

npm: npm install @hapi/catbox-redis

yarn: yarn add @hapi/catbox-redis

Module Status:
Version License Node Dependencies CI
BSD 16, 18, 20, 22 Dependency Status Build Status
BSD 16, 18, 20, 22 Dependency Status Build Status

Usage

Sample catbox cache initialization:

const Catbox = require('@hapi/catbox');
const { Engine: CatboxRedis } = require('@hapi/catbox-redis');
const cache = new Catbox.Client(CatboxRedis, {
 partition : 'my_cached_data',
 host: 'redis-cluster.domain.com',
 port: 6379,
 db: 0,
 tls: {},
});

When used in a hapi server (hapi version 18 or newer):

const Hapi = require('hapi')
const { Engine: CatboxRedis } = require('@hapi/catbox-redis');
const server = new Hapi.Server({
 cache : [
 {
 name: 'my_cache',
 provider: {
 constructor: CatboxRedis,
 options: {
 partition : 'my_cached_data',
 host: 'redis-cluster.domain.com',
 port: 6379,
 db: 0,
 tls: {},
 }
 }
 }
 ]
});

AltStyle によって変換されたページ (->オリジナル) /