From superpowers-laravel
Implements Laravel caching: framework caches via artisan, value/query caching with remember(), tags for grouped invalidation, locks against thundering herds, and explicit strategies for performance and correctness.
npx claudepluginhub jpcaparas/superpowers-laravel --plugin superpowers-laravelThis skill uses the workspace's default tool permissions.
```
Provides Laravel caching best practices: remember/forever/flexible patterns, tags for invalidation, atomic locks. Optimizes performance in data-heavy apps.
Optimizes Laravel database performance with patterns for Eloquent queries, migrations, indexing, N+1 fixes, Redis caching, pagination, transactions, and slow query debugging.
Implements caching strategies using Redis, Memcached, CDN, and invalidation patterns to optimize app performance, reduce database load, and improve response times.
Share bugs, ideas, or general feedback.
php artisan route:cache
php artisan config:cache
php artisan view:cache
Clear with the corresponding clear commands when needed in deployments.
Cache::remember("post:{$id}", 600, fn () => Post::findOrFail($id));
// Stable keys and scopes (e.g., tenant, locale)
Cache::remember("tenant:{$tenantId}:users:index:page:1", now()->addMinutes(5), function () {
return User::with('team')->paginate(50);
});
// Tags (supported drivers) for grouped invalidation
Cache::tags(['users'])->remember('users.index.page.1', now()->addMinutes(5), fn () => ...);
Cache::tags(['users'])->flush();
// Locks to ensure exclusive expensive work
Cache::lock('reports:daily', 30)->block(5, function () {
generateReports();
});
remember() to prevent thundering herds