PHPackages                             ringzhu/cache-laravel-sanctum - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. ringzhu/cache-laravel-sanctum

ActiveLibrary[Caching](/categories/caching)

ringzhu/cache-laravel-sanctum
=============================

Sanctum use cache to retrieve token

0.3.0(1y ago)076MITPHPPHP ^8.0

Since May 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ringzhu/cache-laravel-sanctum)[ Packagist](https://packagist.org/packages/ringzhu/cache-laravel-sanctum)[ RSS](/packages/ringzhu-cache-laravel-sanctum/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (14)Versions (5)Used By (0)

cache-laravel-sanctum
=====================

[](#cache-laravel-sanctum)

Let Laravel Sanctum Use Cache to Retrieve Tokens
================================================

[](#let-laravel-sanctum-use-cache-to-retrieve-tokens)

Laravel Sanctum executes 3 database queries for every HTTP request. This package wraps the default `PersonalAccessToken` model, uses cache to retrieve the `personal_access_token` and `tokenable` model. This reduces 2 queries for most requests.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ringzhu/cache-laravel-sanctum
```

Usage
-----

[](#usage)

Once you have this package in your project, Sanctum tokens will be retrieved through cache automatically. Redis cache is recommended.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance42

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~102 days

Total

4

Last Release

471d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15833129?v=4)[ringzhu](/maintainers/ringzhu)[@ringzhu](https://github.com/ringzhu)

---

Top Contributors

[![ringzhu](https://avatars.githubusercontent.com/u/15833129?v=4)](https://github.com/ringzhu "ringzhu (4 commits)")

---

Tags

laraveltokencachesanctumringzhu

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ringzhu-cache-laravel-sanctum/health.svg)

```
[![Health](https://phpackages.com/badges/ringzhu-cache-laravel-sanctum/health.svg)](https://phpackages.com/packages/ringzhu-cache-laravel-sanctum)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[unopim/unopim

UnoPim Laravel PIM

10.3k2.2k](/packages/unopim-unopim)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6753.6k5](/packages/hasinhayder-tyro)[omaralalwi/lexi-translate

Laravel translation package with morph relationships and caching.

748.5k3](/packages/omaralalwi-lexi-translate)[byerikas/cache-tags

Allows for Redis/Valkey cache flushing multiple tagged items by a single tag.

1418.0k](/packages/byerikas-cache-tags)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
