bun-redis

Solid

Use 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

View on GitHub

Quality Score: 89/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

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