orzcc / aliyun-ocs
阿里云ocs适用于Laravel5
dev-master
2015-12-28 06:57 UTC
Requires
- php: >=5.4.0
- illuminate/support: ~5.0|~5.1|~5.2
This package is auto-updated.
Last update: 2024-09-21 19:50:21 UTC
README
阿里云ocs适用于Laravel5.
要求
-
= PHP 5.4 且需要 ext-memcached
- 使用ocs必须启用SASL支持,确保在php.ini中memcached.use_sasl设置为ON
安装
此包可以通过Composer安装。
composer require orzcc/aliyun-ocs
必须注册此服务提供者。
// config/app.php 'providers' => [ '...', 'Orzcc\AliyunOcs\AliyunOcsServiceProvider', ];
最后,您可以编辑配置文件:config/cache.php。
向文件中添加存储配置,更改您的ocs配置
'ocs' => [ 'driver' => 'ocs', 'servers' => [ [ 'host' => 'Your ocs host', 'port' => 11211, // ocs port 'weight' => 100, // 如果免密码登录,则删除以下两行 'authname' => 'Your ocs auth name', 'authpass' => 'Your ocs auth pass', ], ], ],
将默认值更改为ocs
'default' => 'ocs';
用法
现在您可以使用Laravel5的缓存,请参阅文档,https://laravel.net.cn/docs/5.0/cache