redis-patterns

Implement Redis caching, queues, pub/sub for Laravel apps.

3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/bipinks/ghost-office --skill redis-patterns-bipinks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis-patterns
Source: https://github.com/bipinks/ghost-office/tree/main/.claude/skills/redis-patterns
Command: npx skills add https://github.com/bipinks/ghost-office --skill redis-patterns-bipinks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a consolidated set of Redis patterns for building scalable, high-performance applications, covering caching strategies, queue management, pub/sub, rate limiting, and multi-tenant patterns.

Core Features & Use Cases

  • Caching strategies: cache-aside, write-through, and write-behind for responsive reads and data consistency.
  • Queue management and Horizon: task queues, retries, and batch processing with Redis-backed queues.
  • Pub/Sub and broadcasting: real-time notifications and event distribution across tenants.
  • Data structures and session management: efficient use of strings, hashes, lists, sets, and per-tenant session keys.
  • Use Case: Implement a multi-tenant caching layer with per-branch keys and TTLs to isolate data.

Quick Start

Start by selecting a caching pattern (cache-aside, write-through, or write-behind) and implement it with Redis in your current Laravel project.

Frequently Asked Questions about redis-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Redis caching strategies in a Laravel application?

Redis caching strategies in Laravel involve implementing cache-aside, write-through, or write-behind patterns to ensure responsive reads and data consistency. You select a caching pattern and apply it with Redis to manage data access efficiently.

What is the best way to isolate cache data in a multi-tenant app?

Isolating cache data in a multi-tenant app is best achieved by implementing a multi-tenant caching layer with per-branch keys and TTLs. This ensures data separation and prevents cache leakage between different tenants.

How does Redis pub/sub work for real-time broadcasting?

Redis pub/sub works by distributing events and notifications across subscribers in real-time. It enables event broadcasting across tenants, allowing services to push notifications efficiently without polling the database.

Can I use Redis for queue management and task retries?

Yes, you can use Redis for queue management to handle task queues, retries, and batch processing. Redis-backed queues, when managed with Horizon, provide reliable task execution and monitoring for high-traffic services.

What are the best practices for Redis key naming and TTLs?

Best practices for Redis key naming and TTLs involve establishing clear guidance on implementation details to ensure safe Redis configuration. Proper key naming and TTLs maintain data isolation, prevent stale data, and optimize memory usage.

When should I use write-behind caching instead of cache-aside?

You should use write-behind caching instead of cache-aside when you need to handle high-write throughput by asynchronously updating the data store. Cache-aside is better suited for responsive reads where data consistency is managed on demand.