overtrue/laravel-passport-cache-token
Caches Laravel Passport access tokens so API authentication no longer hits the database on every request. This drop-in package stores token data in your configured cache store, cutting query load and speeding up response times in high-traffic applications.
Consider adopting when:
Look elsewhere when:
Executives (30 seconds): "This is a small dependency that removes a database lookup from every authenticated API request by caching access tokens. The new release only adds Laravel 10 support — no new features — so its real value right now is that it stops being a blocker for our framework upgrade. Upside is lower auth latency and less database load as traffic grows. The cost is that revoked tokens stay valid until a cache expiry we configure, so we need security to bless that window before we ship it. Low effort, low risk, reversible."
Engineering (the actual work): "Compatibility-only release, no API changes — merge risk is near zero. Install, point it at Redis (not array/file cache), set a TTL that matches an agreed revocation SLA, and make sure cache misses and cache failures fall back to the DB without stampeding it. Validate with: hit rate on token lookups, p95 latency on the auth middleware, and read QPS on oauth_access_tokens before and after. Two standing risks: one maintainer and no verified support past Laravel 10 — so pin the version, and treat the ~small codebase as forkable if it goes stale."
Recommendation to record alongside adoption: proceed if (a) we are upgrading to Laravel 10, and (b) security signs a written revocation window. Otherwise, defer — the DB cost of Passport validation is real but rarely the first thing worth fixing.
How can I help you explore Laravel packages today?