Registry / database / alaska-cache-redis

alaska-cache-redis

JSON →
library0.13.2jsnpmunverified

Redis cache driver for the Alaska framework (version 0.13.2). This package provides a Redis-backed cache store integrating with Alaska's caching system. It wraps the node_redis client to offer configurable TTL, connection URI, and standard cache operations. As part of the Alaska ecosystem, it is designed for Node.js applications using that framework. Release cadence is low; the package is stable but not actively maintained. Key differentiator is its tight coupling with Alaska's cache interface.

npm install alaska-cache-redis
INSTALL
IMPORT
SIG · ALASKA-CACHE-REDIS
A
alaska-cache-redis
databasejavascriptv0.13.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import alaskaCacheRedis from 'alaska-cache-redis'
const alaskaCacheRedis = require('alaska-cache-redis')
Package provides a default export (the driver class). ESM import recommended.
AlaskaCacheRedis
import { AlaskaCacheRedis } from 'alaska-cache-redis'
const { AlaskaCacheRedis } = require('alaska-cache-redis')
Named export also available for explicit imports.
AlaskaRedisCacheDriver
import { AlaskaRedisCacheDriver } from 'alaska-cache-redis'
Alternative named export. Check package source for exact name.

Setup and basic usage of alaska-cache-redis as the cache driver in an Alaska application.

import { Alaska } from 'alaska'; import alaskaCacheRedis from 'alaska-cache-redis'; const alaska = new Alaska({ cache: { type: 'alaska-cache-redis', url: process.env.REDIS_URL ?? 'redis://localhost:6379/0', maxAge: 3600 * 1000 } }); async function example() { const cache = alaska.cache; await cache.set('key', 'value', 1000); const val = await cache.get('key'); console.log(val); // 'value' await cache.del('key'); } example();
Debug
Known issues
gotchamaxAge default is 0 (forever) if not configured. Keys may never expire.
fix
Always set maxAge in configuration to prevent unbounded cache growth.
affects: >=0.0.0
gotchaRequires redis server running. No fallback if Redis is unavailable.
fix
Ensure Redis is running and accessible. Consider adding error handling or a fallback cache.
affects: >=0.0.0
deprecatedThe underlying node_redis (redis) package is considered deprecated in favor of ioredis.
fix
No direct fix in this package; consider switching to a different cache driver that uses ioredis.
affects: >=0.0.0
breakingBreaking changes may occur when upgrading Alaska framework major versions.
fix
Upgrade to latest alaska-cache-redis compatible with your Alaska version.
affects: <0.13.0
Errors
Common errors & fixes
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server not running or not accessible.
fix
Start Redis server or update the url configuration to point to a running instance.
TypeError: alaska.cache.set is not a function
Cache driver not properly loaded or configured.
fix
Ensure alaska-cache-redis is installed and correctly set in the cache type configuration.
Upgrade
Version history
0.13.2latest on npm
Audit
Dependencies
alaskarequiredPeer dependency: integrates as a cache driver for the Alaska framework
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
alaska-cache-redis — npm install alaska-cache-redis · libregistry