소스 정보
- 저장소
- mikailustuner/OmniRule
- 최근 소스 활동
- 2026년 5월 8일 23:36
- 감지된 SKILL.md 언어
- 영어
- 스타
- 5
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/mikailustuner/OmniRule --skill redis-patterns명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | redis-patterns |
| description | Redis Patterns: Data structures, cache strategies, pub/sub, distributed locks. |
| triggers | {"keywords":["Redis","cache","session","pub/sub","rate limit","distributed lock","sorted set","pipeline"]} |
| auto_load_when | Using Redis for caching or pub/sub |
| agent | infra-specialist |
| tools | ["Read","Write","Bash"] |
Focus: In-memory data structures, caching, session storage
String:
├── Simple key-value
├── Used for: cache, counters, flags
└── Commands: SET, GET, INCR
Hash:
├── Field-value pairs
├── Used for: objects, metadata
└── Commands: HSET, HGET, HGETALL
List:
├── Ordered strings
├── Used for: queues, logs
└── Commands: LPUSH, RPOP, LRANGE
Set:
├── Unique strings, no order
├── Used for: tags, unique visitors
└── Commands: SADD, SMEMBERS
Sorted Set:
├── Score-value pairs, ordered
├── Used for: rankings, time-series
└── Commands: ZADD, ZRANGE
Cache patterns:
├── Cache-aside: App checks cache first
├── Write-through: Update cache on write
├── Write-behind: Async cache update
└── Refresh-ahead: Proactive refresh
TTL: Set expiration for all cache keys
Use Redis for:
├── Session storage
├── Real-time features
├── Rate limiting
├── Message queues
├── Pub/sub
├── Leaderboards
└── Caching layer
Avoid Redis for:
├── Primary data store (without persistence)
├── Complex queries
├── Large blobs (>1MB)
└── Data that doesn't fit in RAM
Redlock pattern:
├── Acquire lock with SET NX + TTL
├── Only one client succeeds
├── Release with DEL
└── Add expiration to prevent deadlocks
Consider: Redisson library
Pattern:
├── Channel-based messaging
├── Publisher → Channel → Subscribers
└── Fire-and-forget
Use cases:
├── Real-time notifications
├── Cache invalidation
└── Event distribution
Best practices:
├── Use pipelines for bulk ops
├── Choose right data structure
├── Avoid KEYS in production (use SCAN)
├── Monitor memory
└── Use connection pooling
RDB (snapshots):
├── Periodic snapshots
├── Good for backups
└── Data loss possible
AOF (append-only):
├── Every write logged
├── Slower, more data
└── More durable
(End of file - 82 lines)
❌ Storing large objects (>1MB) in Redis
✅ Redis for hot, small data; use S3/DB for large blobs
❌ No TTL on cached keys — memory fills up
✅ Every cache key has a TTL; use allkeys-lru eviction policy
❌ KEYS * in production (blocks Redis)
✅ Use SCAN with cursor for key iteration
❌ Using Redis as primary data store
✅ Redis is cache / queue / pub-sub — not source of truth
❌ No Redis Sentinel / Cluster for production
✅ Sentinel for HA; Cluster for horizontal scale
| Use case | Redis type | Command |
|---|---|---|
| Cache key-value | String | SET key val EX 300 |
| Rate limiting | String + INCR | INCR + EXPIRE |
| Session store | Hash | HSET session:id field val |
| Queue | List | LPUSH / BRPOP |
| Pub/sub | Pub/Sub | PUBLISH / SUBSCRIBE |
| Leaderboard | Sorted Set | ZADD / ZRANGE |
| Distributed lock | String + NX | SET lock nx ex 30 |