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

ActiveLibrary[Caching](/categories/caching)

reaway/think-cache
==================

think cache

v8.0.0(5mo ago)027↓94.7%Apache-2.0PHPPHP &gt;=8.0

Since Mar 9Pushed 5mo agoCompare

[ Source](https://github.com/reaway/think-cache)[ Packagist](https://packagist.org/packages/reaway/think-cache)[ Docs](https://github.com/reaway/think-cache)[ RSS](/packages/reaway-think-cache/feed)WikiDiscussions main Synced 4w ago

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

think-cache
===========

[](#think-cache)

安装
--

[](#安装)

```
composer require reaway/think-cache
```

用法
--

[](#用法)

```
use Think\Component\Cache\Facade\CacheFacade;

require __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

CacheFacade::setConfig([
    'default' => 'file',
    'stores' => [
        'file' => [
            'type' => 'File',
            // 缓存保存目录
            'path' => __DIR__ . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR,
            // 缓存前缀
            'prefix' => '',
            // 缓存有效期 0表示永久缓存
            'expire' => 0,
        ],
        'redis' => [
            'type' => 'redis',
            'host' => '127.0.0.1',
            'port' => 6379,
            'prefix' => '',
            'expire' => 0,
        ],
    ],
]);

CacheFacade::set('key', 'value');
CacheFacade::get('key');
```

文档
--

[](#文档)

详细参考 [缓存处理](https://www.kancloud.cn/manual/thinkphp6_0/1037634)

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance73

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

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

Unknown

Total

1

Last Release

151d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[illuminate/contracts

The Illuminate Contracts package.

707133.3M14.7k](/packages/illuminate-contracts)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.8M173](/packages/algolia-algoliasearch-client-php)[moonshine/moonshine

Laravel administration panel

1.3k268.2k86](/packages/moonshine-moonshine)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

379637.6k118](/packages/flow-php-etl)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M647](/packages/shopware-core)

PHPackages © 2026

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