laravel-performance-caching

Cache Laravel data fetches with remember, tags, and locks.

Updated Jun 8, 2025
One-click install
npx skills add https://github.com/noartem/kawa --skill laravel-performance-caching-noartem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-performance-caching
Source: https://github.com/noartem/kawa/tree/main/ui/.ai/skills/laravel-performance-caching
Command: npx skills add https://github.com/noartem/kawa --skill laravel-performance-caching-noartem

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Laravel developers reduce database load and improve response times by using framework caches and explicit invalidation strategies.

Core Features & Use Cases

  • Framework caches: route:cache, config:cache, view:cache
  • Value and query caching with remember
  • Tags and locks for grouped invalidation and exclusive work
  • Clear invalidation commands when deploying
  • Stable keys and naming recommendations to avoid stale data

Quick Start

Wrap a slow query with Cache::remember and set a TTL.

Frequently Asked Questions about laravel-performance-caching

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

FAQPage Schema
How do I cache Laravel query results to reduce database load?

Cache Laravel query results by wrapping slow database fetches with Cache::remember and setting a TTL to serve repeated reads efficiently and reduce direct database queries.

What's the best way to handle cache invalidation in a multi-tenant Laravel app?

Handle cache invalidation in multi-tenant Laravel apps by using cache tags for grouped clearing and explicit invalidation commands during deployments to prevent serving stale data across tenant contexts.

How do cache locks work in Laravel for exclusive tasks?

Cache locks in Laravel manage exclusive work by restricting concurrent access to specific operations, ensuring only one process executes a task at a time while others wait for the lock release.

When should I use framework caches like route and config caching in Laravel?

Use Laravel framework caches like route:cache, config:cache, and view:cache in production to pre-compile application paths and settings, significantly reducing bootstrap time and boosting response efficiency.

Why does my Laravel cache return stale data after deploying updates?

Laravel caches return stale data after updates if invalidation is skipped. Clear cached values, tags, and framework caches explicitly during deployment to ensure users receive freshly provisioned application data.

Do I need stable cache key naming for Laravel TTL caches?

Stable cache key naming is required for Laravel TTL caches to ensure correct data retrieval, prevent key collisions, and support reliable invalidation across multi-tenant application contexts.