PHPackages                             php-woox/webman-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. php-woox/webman-cache

ActiveLibrary[Caching](/categories/caching)

php-woox/webman-cache
=====================

Webman plugin php-woox/webman-cache

v0.0.1(2y ago)06MITPHPPHP &gt;=8.2

Since May 11Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (12)Versions (2)Used By (0)

php-woox/webman-cache
=====================

[](#php-wooxwebman-cache)

Laravel [illuminate/cache](https://packagist.org/packages/illuminate/cache) for webman

介绍
--

[](#介绍)

站在巨人（laravel）的肩膀上使缓存使用更加*可靠*和*便捷*

所有方法和配置与 laravel 几乎一模一样，因此使用方式完全参考 [Laravel文档](https://laravel.com/docs/10.x/cache) 即可

同步支持 [RateLimiter](https://laravel.com/docs/10.x/rate-limiting)

安装
--

[](#安装)

```
composer require php-woox/webman-cache
```

使用
--

[](#使用)

所有 API 同 laravel，以下仅对有些特殊的操作做说明

### Facade 入口

[](#facade-入口)

使用 `Woox\WebmanCache\Facades\Cache` 代替 `Illuminate\Support\Facades\Cache`

使用 `Woox\WebmanCache\Facades\RateLimiter` 代替 `Illuminate\Support\Facades\RateLimiter`

### command 支持

[](#command-支持)

- `php webman cache:forget xxx`: 删除缓存下的某个键
- `php webman cache:clear`: 清空所有缓存 （！！注意：此方法使用 Cache::flush 来清除，影响范围见下文中的使用注意事项！！）

### extend 支持

[](#extend-支持)

在 `config/plugin/woox/webman-cache/cache.php` 中配置 `extend`

```
