Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lada Cache Laravel Package

spiritix/lada-cache

Redis-based, fully automated query cache for Laravel. Transparent with Eloquent/Query Builder, granular invalidation of affected rows/tables, scalable and cluster-ready. Includes Debugbar insights and table include/exclude controls.

View on GitHub
Deep Wiki
Context7

A Redis based, fully automated and scalable database cache layer for Laravel

Frequently asked questions about Lada Cache
How does spiritix/lada-cache work without requiring manual cache tags or query modifications?
Lada Cache integrates at the Laravel database connection level using `DB::extend()`, intercepting all Eloquent and Query Builder queries. It generates cache keys automatically based on SQL structure and invalidates only affected rows or tables when data changes, so no manual tags or query alterations are needed.
Will lada-cache work with Laravel 13 and PHP 8.3?
Yes, Lada Cache 6.x is fully compatible with Laravel 13 and PHP 8.3. The package was rewritten specifically for these versions, addressing performance and stability improvements over older releases.
How does granular invalidation work for row-level changes?
When a row is updated or deleted, Lada Cache uses the model’s primary key to invalidate only the cached queries for that specific row. If the primary key is composite or non-standard, it falls back to table-level invalidation to ensure consistency.
Can I exclude specific tables or models from caching?
Absolutely. Lada Cache allows fine-grained control via the config file. You can disable caching globally or specify which tables/models to include or exclude, making it flexible for mixed workloads.
Does lada-cache support Redis clusters or failover configurations?
Yes, Lada Cache leverages Laravel’s Redis cache driver, which natively supports clusters and failover configurations. You can use the same Redis setup you already have for caching, ensuring high availability and scalability.
Will complex queries (e.g., subqueries, joins) be cached properly?
Lada Cache handles most standard queries well, but complex queries like nested subqueries or `UNION` operations may not be fully supported for row-level invalidation. In such cases, it defaults to table-level invalidation to maintain correctness.
How do I monitor cache performance (hits, misses, invalidations) in production?
Lada Cache integrates with Laravel Debugbar, providing real-time stats on cache hits, misses, and invalidations. For production monitoring, you can also log these metrics or use Laravel’s built-in logging to track performance.
What happens if Redis goes down? Does the app fall back to the database?
If Redis is unavailable, Lada Cache will automatically bypass caching and execute queries directly against the database. This ensures your application remains functional, though performance may degrade temporarily.
Can I use lada-cache with custom query builders or third-party ORMs?
Lada Cache primarily targets Laravel’s Eloquent and Query Builder. Custom query builders or third-party ORMs may bypass the caching layer, requiring manual integration or exclusion in the config to maintain consistency.
How do I test cache behavior, especially invalidation and edge cases?
Lada Cache includes comprehensive test coverage and supports mocking Redis for unit tests. For integration testing, use Laravel’s testing tools to simulate writes and verify cache invalidation. The Debugbar integration also helps debug edge cases during development.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope