scabarcas/laravel-permissions-redis
A Laravel package that adds a Redis-backed permissions layer for fast authorization. Store and check roles and permissions with less database overhead, ideal for high-throughput apps needing quick access checks and simple integration with Laravel’s authorization ecosystem.
spatie/laravel-permission (mature, DB-backed, huge ecosystem) and a bespoke cache layer. Useful input to a "do we wrap Spatie with a Redis cache, adopt this, or build our own" decision — the package is essentially the "buy a thin, opinionated cache wrapper" path.Consider it when:
roles/permissions/pivot lookups dominating request time.Look elsewhere when:
spatie/laravel-permission is the safer default here.Key diligence questions before adopting: What is the failure mode when Redis is unavailable — fail-open (security incident) or fail-closed (outage)? How is cache invalidation triggered on role change, and is it transactional with the DB write? What happens under maxmemory eviction? Is there a documented rebuild/backfill path?
For executives: We have an opportunity to cut authorization overhead by moving role and permission checks out of the database and into Redis, the in-memory store we already run. This is a narrow, low-cost infrastructure improvement — not a new product capability — and it only pays off if our monitoring confirms authorization queries are actually a bottleneck. The candidate package is MIT-licensed and small, so the real cost is not licensing but engineering ownership: with 39 GitHub stars and no downstream dependents, we would plan to fork and maintain it ourselves rather than rely on upstream. Recommendation is a time-boxed spike to measure the win before any commitment.
For engineering: This is a thin Redis-backed RBAC layer for Laravel that swaps repeated pivot-table lookups for cache reads. It is attractive as a reference implementation and as a fast way to quantify the ceiling on authz latency. Treat it as unproven: single maintainer, near-zero adoption, and the hard problems (invalidation correctness, Redis eviction semantics, fail-open vs. fail-closed behavior) are exactly the ones a 39-star package has not been battle-tested on. Evaluate it against the cheaper alternative first — caching our existing Spatie permission resolution — and only adopt wholesale if the numbers justify taking on maintenance. Either way, we own the fork and the tests.
How can I help you explore Laravel packages today?