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

ActiveLibrary

shopwwi/laravel-cache
=====================

laravel-cache for the webman

v2.0.0(1y ago)108.9k36MITPHP

Since Oct 1Pushed 1y agoCompare

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

READMEChangelog (7)Dependencies (2)Versions (9)Used By (6)

[!['Build Status'](https://camo.githubusercontent.com/bb2a0a23311aaa35b8aeb3042dd3ee27a3b10ec7fceac26471de1f8aae75c852/68747470733a2f2f7472617669732d63692e6f72672f73686f707777692f6c61726176656c2d63616368652e7376673f6272616e63683d6d61696e)](https://github.com/shopwwi/laravel-cache) [!['Latest Stable Version'](https://camo.githubusercontent.com/60a50b20533823045cb0f654312248827745eaafca68b7925ba8422c8b6889ea/68747470733a2f2f706f7365722e707567782e6f72672f73686f707777692f6c61726176656c2d63616368652f762f737461626c652e737667)](https://packagist.org/packages/shopwwi/laravel-cache) [!['Total Downloads'](https://camo.githubusercontent.com/c425bd96e9b2a3d6b6fd27a43ec1913a0655c3f3c6650c21ed76067eec2c78ed/68747470733a2f2f706f7365722e707567782e6f72672f73686f707777692f6c61726176656c2d63616368652f642f746f74616c2e737667)](https://packagist.org/packages/shopwwi/laravel-cache) [!['License'](https://camo.githubusercontent.com/9792185913f73ee3d5a1b0a180efdf35f4bf5f93f49d201203542bddb0dba138/68747470733a2f2f706f7365722e707567782e6f72672f73686f707777692f6c61726176656c2d63616368652f6c6963656e73652e737667)](https://packagist.org/packages/shopwwi/laravel-cache)

安装
==

[](#安装)

- php 7.x

```
composer require shopwwi/laravel-cache illuminate/cache ^8.0

```

- php 8.x

```
composer require shopwwi/laravel-cache

```

- 注意：如果提示你的php版本过高 一般都是由illuminate/cache或者illuminate/filesystem版本过低导致 添加版本安装即可

```
composer require shopwwi/laravel-cache illuminate/cache ^10.0 illuminate/filesystem ^10.0

```

配置文件
----

[](#配置文件)

```
//路径 config/laravelcache.php

```

支持驱动
----

[](#支持驱动)

- apc
- array
- file 本地缓存
- redis 缓存
- memcached 缓存
- database 数据库缓存
- dynamodb
- octane

缓存使用
----

[](#缓存使用)

### 获取缓存实例

[](#获取缓存实例)

要获取缓存存储实例，您可以使用 `Cache Facade`，我们将在本文档中使用它。`Cache Facade` 提供了对 `Laravel` 缓存合约底层实现的方便、简洁的访问：

```
