smithery/neversight

laravel-performance-caching

Use framework caches and value/query caching to reduce work; add tags, locks, and explicit invalidation strategies for correctness

Installation

$ npx skills add smithery/neversight --skill laravel-performance-caching

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/neversight · top by installs.

npx skills add smithery/neversight

Browse all from smithery/neversight

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,433 B
  • docs SUMMARY.md 165 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Caching Basics

Framework caches

php artisan route:cache
php artisan config:cache
php artisan view:cache

Clear with the corresponding clear commands when needed in deployments.

Values and queries

Cache::remember("post:{$id}", 600, fn () => Post::findOrFail($id));
  • Choose TTLs based on freshness requirements
  • Invalidate explicitly on writes when correctness matters

Patterns and Strategies

// 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();
});
  • Use stable, namespaced keys; include any scoping dimension
  • Prefer remember() to prevent thundering herds
  • Use cache tags (if supported) to invalidate related entries together
  • Avoid caching highly dynamic or user-specific data without a plan
  • Document invalidation triggers next to cached code