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

ActiveLibrary[Caching](/categories/caching)

wlfpanda1012/laravel-passport-cache
===================================

cache passport items

1.0.0(2y ago)281MITPHPPHP ^8.1

Since Apr 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ShaBaoFa/laravel-passport-cache)[ Packagist](https://packagist.org/packages/wlfpanda1012/laravel-passport-cache)[ RSS](/packages/wlfpanda1012-laravel-passport-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel passport cache
======================

[](#laravel-passport-cache)

思路源于 [overtrue/laravel-passport-cache-token](https://github.com/overtrue/laravel-passport-cache-token) 项目 但是我发现其实并没有完全解决所有的对于 oauth 的数据库sql问题。

```
[2024-04-01 11:48:41] local.INFO: TokenRepository find id: cf0e54e73d2bd0c7acb15e89db5ef2d5ca9c86a439d13e46263ad1450448c848fc36d11c57c11414
[2024-04-01 11:48:41] local.INFO: select * from `oauth_access_tokens` where `id` = ? limit 1 ["cf0e54e73d2bd0c7acb15e89db5ef2d5ca9c86a439d13e46263ad1450448c848fc36d11c57c11414"]
[2024-04-01 11:48:41] local.INFO: ClientRepository find id: 2
[2024-04-01 11:48:41] local.INFO: select * from `oauth_clients` where `id` = ? limit 1 ["2"]
[2024-04-01 11:48:41] local.INFO: TokenRepository find id: cf0e54e73d2bd0c7acb15e89db5ef2d5ca9c86a439d13e46263ad1450448c848fc36d11c57c11414
[2024-04-01 11:48:41] local.INFO: select * from `oauth_access_tokens` where `id` = ? limit 1 ["cf0e54e73d2bd0c7acb15e89db5ef2d5ca9c86a439d13e46263ad1450448c848fc36d11c57c11414"]
```

TokenRepository 中的缓存解决了，但是 ClientRepository 中的缓存并没有解决，所以我决定自己实现一个。

Installing
----------

[](#installing)

```
$ composer require wlfpanda1012/laravel-passport-cache -vvv
```

Usage
-----

[](#usage)

**config/passport.php**

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

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

                        // Cache tags
                        'tags' => [],
                    ],
                    'client' => [
                        // Cache key prefix
                        'prefix' => 'passport_client',

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

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

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

776d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelcachepassport

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[anahkiasen/flatten

A package for the Illuminate framework that flattens pages to plain HTML

33113.0k](/packages/anahkiasen-flatten)[omaralalwi/lexi-translate

Laravel translation package with morph relationships and caching.

754.3k2](/packages/omaralalwi-lexi-translate)[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)
