
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@volt.js/adapter-redis
Advanced tools
[](https://www.npmjs.com/package/@volt.js/adapter-redis) [](https://opensource.org/licenses/MIT)
The official Redis adapter for the Volt.js Store system. This package provides a high-performance driver for caching and pub/sub messaging using a Redis data store.
This adapter acts as the concrete implementation for the abstract Store interface defined in @volt.js/core. By plugging this adapter into your application, you enable powerful features:
Volt.js Queues (BullMQ) adapter, for maximum efficiency.To use this adapter, you need to install it along with its peer dependency, ioredis.
# npm
npm install @volt.js/adapter-redis ioredis
# yarn
yarn add @volt.js/adapter-redis ioredis
# pnpm
pnpm add @volt.js/adapter-redis ioredis
# bun
bun add @volt.js/adapter-redis ioredis
The primary export of this package is the createRedisStoreAdapter factory function.
First, create an instance of the ioredis client and pass it to the adapter factory. This is typically done in a dedicated service file.
// src/services/store.ts
import { createRedisStoreAdapter } from '@volt.js/adapter-redis';
import { Redis } from 'ioredis';
// It's recommended to configure your Redis connection via environment variables.
const redis = new Redis(process.env.REDIS_URL);
/**
* The Store adapter for data persistence and messaging.
*/
export const store = createRedisStoreAdapter({
client: redis,
// Optional: A global prefix for all keys stored by this adapter.
keyPrefix: 'volt-app:',
});
Next, enable the Store feature in your main volt.ts file by passing your store adapter instance to the .store() method on the builder.
// src/volt.ts
import { Volt } from '@volt.js/core';
import { store } from './services/store';
export const volt = Volt
.context<AppContext>()
.store(store) // Enable the Store feature
.create();
Your application is now configured to use Redis for caching and pub/sub. You can access the store's methods via volt.store or context.store within your actions.
Example of use in an action:
handler: async ({ context, response }) => {
// Set a value in the cache with a 1-hour TTL
await context.store.set('user:123', { name: 'John Doe' }, { ttl: 3600 });
// Get the value
const user = await context.store.get('user:123');
return response.success({ user });
}
For more detailed guides, please refer to the Official Volt.js Wiki.
Contributions are welcome! Please see the main CONTRIBUTING.md file for details on how to get started.
This package is licensed under the MIT License.
FAQs
[](https://www.npmjs.com/package/@volt.js/adapter-redis) [](https://opensource.org/licenses/MIT)
We found that @volt.js/adapter-redis demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.