bun-redis
SolidUse when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.
API & Backend 168 stars
27 forks Updated 4 weeks ago MIT
Install
Quality Score: 89/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Bun Redis
Redis integration with Bun using popular Redis clients.
## Client Options
| Client | Best For | Install |
|--------|----------|---------|
| `ioredis` | Self-hosted Redis | `bun add ioredis` |
| `@upstash/redis` | Serverless/Edge | `bun add @upstash/redis` |
| `redis` | Official Node client | `bun add redis` |
## ioredis Setup
```typescript
import Redis from "ioredis";
// Default connection
const redis = new Redis();
// With options
const redis = new Redis({
host: "localhost",
port: 6379,
password: "secret",
db: 0,
});
// Connection string
const redis = new Redis("redis://:password@localhost:6379/0");
// TLS connection
const redis = new Redis({
host: "redis.example.com",
port: 6380,
tls: {},
});
```
## Basic Operations
```typescript
import Redis from "ioredis";
const redis = new Redis();
// Strings
await redis.set("name", "Alice");
await redis.set("count", "100");
await redis.setex("temp", 60, "expires in 60s"); // With TTL
const name = await redis.get("name"); // "Alice"
const count = await redis.incr("count"); // 101
await redis.del("name");
// Check existence
const exists = await redis.exists("name"); // 0 or 1
// TTL
await redis.expire("key", 3600); // Set 1 hour TTL
const ttl = await redis.ttl("key"); // Get remaining TTL
```
## Data Structures
### Hashes
```typescript
// Set hash fields
await redis.hset("user:1", {
name: "Alice",
email: "alice@example.com",
age: "30",
});
// Get single field
const name = await redis.hge...
Details
- Author
- secondsky
- Repository
- secondsky/claude-skills
- Created
- 7 months ago
- Last Updated
- 4 weeks ago
- Language
- TypeScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
redis
Redis caching patterns, pub/sub, sessions, rate limiting, and data structures.
1,313 Updated today
a5c-ai API & Backend Listed
redis-caching
Redis caching strategies, pub/sub, sessions, and performance optimization.
2 Updated 4 months ago
cgyudistira AI & Automation Listed
redis
Add and debug Redis caching, TTLs, sessions, queues, rate limits, and cache invalidation.
6 Updated today
khovan123