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

ActiveLibrary[Caching](/categories/caching)

uniondrug/cache
===============

cache component for uniondrug/framework

2.1.1(8y ago)01.8k[1 PRs](https://github.com/uniondrug/cache/pulls)1proprietaryPHP

Since Feb 1Pushed 8y ago2 watchersCompare

[ Source](https://github.com/uniondrug/cache)[ Packagist](https://packagist.org/packages/uniondrug/cache)[ RSS](/packages/uniondrug-cache/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (1)Versions (7)Used By (1)

Cache component for uniondrug/framework
=======================================

[](#cache-component-for-uniondrugframework)

安装
--

[](#安装)

```
$ cd project-home
$ composer require uniondrug/cache
$ cp vendor/uniondrug/cache/cache.php config/
```

修改 `app.php` 配置文件，加上Cache服务，服务名称`cache`

```
return [
    'default' => [
        ......
        'providers'           => [
            ......
            \Uniondrug\Cache\CacheServiceProvider::class,
        ],
    ],
];
```

配置
--

[](#配置)

配置文件在 `config.php` 中，可以根据环境设置不同的缓存方案

```
