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)075MITPHPPHP ^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 today

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

28

—

LowBetter than 57% of packages

Maintenance49

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

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

374d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8977032ed5a8be89971388d8de2857478df92baea6e88e9f960d45949d5706fe?d=identicon)[ringzhu](/maintainers/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

[swayok/alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/

202525.9k6](/packages/swayok-alternative-laravel-cache)[arifhp86/laravel-clear-expired-cache-file

Remove laravel expired cache file/folder

36124.6k](/packages/arifhp86-laravel-clear-expired-cache-file)[omaralalwi/lexi-translate

Laravel translation package with morph relationships and caching.

733.2k2](/packages/omaralalwi-lexi-translate)[byerikas/cache-tags

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

1412.0k](/packages/byerikas-cache-tags)[michele-angioni/support

Support is a Laravel package which promotes the use of best practices and design patterns.

181.4k1](/packages/michele-angioni-support)[makbulut/laravel-aerospike

Aerospike cache driver for Laravel

102.2k](/packages/makbulut-laravel-aerospike)

PHPackages © 2026

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