
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@sebspark/memredis
Advanced tools
An in-memory implementation of Redis. Fully compatible with the Redis client API for development, testing, and scenarios where an in-memory store suffices.
@sebspark/memredisAn in-memory implementation of Redis. Fully compatible with the Redis client API for development, testing, and scenarios where an in-memory store suffices.
yarn add @sebspark/memredis
import { MemRedis } from '@sebspark/memredis'
const client = new MemRedis()
// Set and get
await client.set('key', 'value')
const value = await client.get('key') // 'value'
// Expiration
await client.setEx('temp-key', 60, 'expires in 60 seconds')
const ttl = await client.ttl('temp-key') // ~60
// Delete
await client.del('key')
const client = new MemRedis()
await client.hSet('user:1', { name: 'Alice', age: '30' })
const user = await client.hGetAll('user:1') // { name: 'Alice', age: '30' }
await client.hDel('user:1', 'age')
const client = new MemRedis()
// Lists
await client.lPush('queue', ['job1', 'job2'])
const job = await client.lPop('queue') // 'job2'
// Sets
await client.sAdd('tags', ['a', 'b', 'c'])
const members = await client.sMembers('tags') // ['a', 'b', 'c']
// Sorted sets
await client.zAdd('leaderboard', { score: 100, value: 'alice' })
const top = await client.zRangeWithScores('leaderboard', 0, 0, { REV: true })
All MemRedis instances share the same pub/sub bus, matching real Redis behaviour where all clients connect to the same server.
import { MemRedis } from '@sebspark/memredis'
const publisher = new MemRedis()
const subscriber = new MemRedis()
await subscriber.subscribe('events', (message) => {
console.log('Received:', message)
})
await publisher.publish('events', 'hello world')
Use MemRedis in tests to avoid Docker overhead while still maintaining Redis-compatible behavior. The e2e test suite verifies MemRedis behavior matches actual Redis exactly.
import { describe, it, expect } from 'vitest'
import { MemRedis } from '@sebspark/memredis'
describe('my cache', () => {
it('stores and retrieves values', async () => {
const cache = new MemRedis()
await cache.set('key', 'value')
expect(await cache.get('key')).toBe('value')
})
})
For production use cases requiring Redis features, use the official redis package.
FAQs
Unknown package
The npm package @sebspark/memredis receives a total of 594 weekly downloads. As such, @sebspark/memredis popularity was classified as not popular.
We found that @sebspark/memredis demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.