PHPackages                             overtrue/laravel-passport-cache-token - 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. overtrue/laravel-passport-cache-token

ActiveLibrary[Caching](/categories/caching)

overtrue/laravel-passport-cache-token
=====================================

Make laravel/passport token cacheable.

3.2.0(3y ago)89273.6k—6.1%193MITPHP

Since Jun 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/overtrue/laravel-passport-cache-token)[ Packagist](https://packagist.org/packages/overtrue/laravel-passport-cache-token)[ Fund](https://www.easywechat.com/img/pay/wechat.jpg)[ GitHub Sponsors](https://github.com/overtrue)[ RSS](/packages/overtrue-laravel-passport-cache-token/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (13)Used By (3)

> 🚨 This package was created because of this issue: [laravel/passport#382](https://github.com/laravel/passport/issues/382) . But the new version of passport has officially solved this issue at: [laravel/passport#1447](https://github.com/laravel/passport/pull/1447), so I think we can stop needing this package.

Laravel Passport Cache Token
============================

[](#laravel-passport-cache-token)

Make [laravel/passport](https://github.com/laravel/passport) token cacheable.

[![Sponsor me](https://github.com/overtrue/overtrue/raw/master/sponsor-me-button-s.svg?raw=true)](https://github.com/sponsors/overtrue)

Installing
----------

[](#installing)

```
$ composer require overtrue/laravel-passport-cache-token -vvv
```

Usage
-----

[](#usage)

Thanks to Laravel's automatic package discovery mechanism, you don't need to do any additional operations.

Of course, you can also control the cache strategy freely, just need to configure the following in the configuration file:

**config/passport.php**

```
return [
    //...
    'cache' => [
        // Cache key prefix
        'prefix' => 'passport_',

        // The lifetime of token cache,
        // Unit: second
        'expires_in' => 300,

        // Cache tags
        'tags' => [],
    ],
];
```

❤️ Sponsor me
-------------

[](#heart-sponsor-me)

[![Sponsor me](https://github.com/overtrue/overtrue/raw/master/sponsor-me.svg?raw=true)](https://github.com/sponsors/overtrue)

如果你喜欢我的项目并想支持它，[点击这里 ❤️](https://github.com/sponsors/overtrue)

Project supported by JetBrains
------------------------------

[](#project-supported-by-jetbrains)

Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.

[![](https://camo.githubusercontent.com/3cf726e7cdadba47755b7f7ea4227945a92a2fa48aadf4a2573140ec6501c989/68747470733a2f2f7265736f75726365732e6a6574627261696e732e636f6d2f73746f726167652f70726f64756374732f636f6d70616e792f6272616e642f6c6f676f732f6a625f6265616d2e737667)](https://www.jetbrains.com/?from=https://github.com/overtrue)

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/overtrue/laravel-passport-cache-token/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/overtrue/laravel-passport-cache-token/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 71.1% 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 ~89 days

Recently: every ~101 days

Total

12

Last Release

1183d ago

Major Versions

1.0.0 → 2.0.02020-10-15

2.x-dev → 3.0.02022-02-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/c507e57eab402e81335012357b7d7df6c5cafda3073adcc94b475037127d263f?d=identicon)[overtrue](/maintainers/overtrue)

---

Top Contributors

[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (32 commits)")[![JimChenWYU](https://avatars.githubusercontent.com/u/12371374?v=4)](https://github.com/JimChenWYU "JimChenWYU (7 commits)")[![joshuadwire](https://avatars.githubusercontent.com/u/3169995?v=4)](https://github.com/joshuadwire "joshuadwire (2 commits)")[![xutongle](https://avatars.githubusercontent.com/u/46956076?v=4)](https://github.com/xutongle "xutongle (1 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (1 commits)")[![maher1337](https://avatars.githubusercontent.com/u/28673923?v=4)](https://github.com/maher1337 "maher1337 (1 commits)")[![oniz93](https://avatars.githubusercontent.com/u/1055434?v=4)](https://github.com/oniz93 "oniz93 (1 commits)")

---

Tags

cachelaravel-passportlaravel-passport-cachetoken-cache

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/overtrue-laravel-passport-cache-token/health.svg)

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

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[genealabs/laravel-model-caching

Automatic caching for Eloquent models.

2.4k4.8M26](/packages/genealabs-laravel-model-caching)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[mikebronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k127.1k1](/packages/mikebronner-laravel-model-caching)

PHPackages © 2026

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