innoge/laravel-policy-soft-cache
Laravel package that adds a soft cache layer for authorization policies, storing policy check results to avoid repeated Gate evaluations and speed up permission checks. It integrates with Laravel's authorization system to reduce policy overhead while keeping your existing policy code unchanged.
Gate::allows / @can checks in list views, dashboards, and API index endpoints that re-resolve roles, teams, or tenant scopes per row. Adopting it converts "rewrite the permission model" into a small, reversible optimization.Consider it when:
Look elsewhere or skip when:
For executives: A low-cost, low-risk performance improvement for permission-heavy screens, adopted via a single dependency rather than internal engineering work. The 1.6.0 release confirms it tracks current Laravel versions, so it won't hold up our framework upgrade. Exposure is contained: it is removable without data migration.
For engineering: Add the package, enable caching for policy checks, and prove the win with before/after query counts and p95 latency on one representative endpoint. Requirements before rollout: pin the version, add tests covering cache invalidation and mid-request permission changes, and document which policies are safe to cache (deterministic, non-audited). 1.6.0 requires no code changes — it is purely Laravel 13 compatibility, so slot the upgrade independently of feature work.
How can I help you explore Laravel packages today?