PHPackages                             laoshifu/think-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. laoshifu/think-cache

ActiveLibrary[Caching](/categories/caching)

laoshifu/think-cache
====================

ThinkPHP 8.0 缓存扩展包

v1.0.1(5mo ago)03Apache-2.0PHPPHP &gt;=8.0.0

Since Dec 8Pushed 5mo agoCompare

[ Source](https://github.com/laoshifu-tech/think-cache)[ Packagist](https://packagist.org/packages/laoshifu/think-cache)[ Docs](https://github.com/laoshifu-tech/think-cache)[ RSS](/packages/laoshifu-think-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

ThinkPHP 8.0 缓存扩展
=================

[](#thinkphp-80-缓存扩展)

适用于 ThinkPHP 8.0+ 的缓存扩展包。

安装
--

[](#安装)

```
composer require laoshifu/think-cache
```

支持的驱动
-----

[](#支持的驱动)

- File（文件缓存）
- Redis
- Memcache
- Memcached
- Wincache

使用方法
----

[](#使用方法)

```
use laoshifu\cache\facade\Cache;

// 设置缓存
Cache::set('name', 'value', 3600);

// 获取缓存
$value = Cache::get('name');

// 删除缓存
Cache::delete('name');

// 清空缓存
Cache::clear();
```

配置
--

[](#配置)

在 `config/cache.php` 中配置：

```
return [
    'default' => 'file',
    'stores' => [
        'file' => [
            'type' => 'File',
            'path' => runtime_path('cache'),
        ],
        'redis' => [
            'type' => 'Redis',
            'host' => '127.0.0.1',
            'port' => 6379,
            'password' => '',
            'select' => 0,
            'timeout' => 0,
        ],
    ],
];
```

版权信息
----

[](#版权信息)

Copyright © 2025 贵州老师傅到家科技有限公司

Licensed under the Apache License 2.0

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance71

Regular maintenance activity

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~0 days

Total

2

Last Release

162d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b5284724bd18a90cb9227fdf8899f132e73e7b1b19b292fb305cf1d0fb64a16?d=identicon)[love827396593-wq](/maintainers/love827396593-wq)

---

Top Contributors

[![tolollipop](https://avatars.githubusercontent.com/u/17916666?v=4)](https://github.com/tolollipop "tolollipop (2 commits)")[![laoshifu-tech](https://avatars.githubusercontent.com/u/234569004?v=4)](https://github.com/laoshifu-tech "laoshifu-tech (1 commits)")

---

Tags

rediscachememcachethinkphp

### Embed Badge

![Health badge](/badges/laoshifu-think-cache/health.svg)

```
[![Health](https://phpackages.com/badges/laoshifu-think-cache/health.svg)](https://phpackages.com/packages/laoshifu-think-cache)
```

###  Alternatives

[robinn/phpcacheadmin

A web dashboard for your favorite caching system.

4441.1k1](/packages/robinn-phpcacheadmin)[ihor/cachalot

Cache a lot in a proper way (APC, XCache, Memcached, Redis, Couchbase)

2528.1k](/packages/ihor-cachalot)[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23517.0k1](/packages/rtcamp-nginx-helper)[garyr/memento

Lightweight cache library

186.6k1](/packages/garyr-memento)

PHPackages © 2026

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