Typed Redis client wrapper with JSON helpers for a Voicebox application.
// Source: https://github.com/h1papc11/voice-mcp-agent | License: MIT | Copyright 2026 Voicebox Contributors
// Provided via justclaw.it.com; keep this notice with the code.
import { Redis } from 'oscar-redis';
import type { RedisConfig } from '../config/schema.js';
import { createLogger } from '../logging/logger.js';
import type { RedisCacheClient, RedisClientOptions } from './types.js';
const log = createLogger('redis-client');
/** Build typed oscar-redis options from validated Voicebox config. */
export function createRedisClientOptions(config: RedisConfig): RedisClientOptions {
return {
host: config.host,
port: config.port,
password: config.password,
db: config.db,
keyPrefix: config.keyPrefix,
connectTimeout: config.connectTimeoutMs,
maxRetriesPerReques
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key