luciano-jr / laravel-aerospike
Laravel 5 中使用 Aerospike 缓存的工具
0.2.1
2016-09-08 09:35 UTC
Requires
- php: >=5.6.0
- illuminate/config: ~5.0
- illuminate/console: ~5.0
- illuminate/http: ~5.0
- illuminate/session: ~5.0
- illuminate/support: ~5.0
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2024-09-18 19:28:25 UTC
README
Aerospike 缓存在 Laravel 5 上的服务
安装
1. 依赖关系
使用 composer,执行以下命令以自动更新您的 composer.json
composer require luciano-jr/laravel-aerospike
或手动更新您的 composer.json
文件
{ "require": { "luciano-jr/laravel-aerospike": "dev-master" } }
2. 提供者
您需要更新应用程序配置以注册该软件包,以便它可以通过 Laravel 加载。只需在您的 config/app.php
文件的 'providers'
部分的末尾添加以下代码即可
// file START ommited 'providers' => [ // other providers ommited Lucianojr\Aerospike\Providers\AerospikeServiceProvider::class, ], // file END ommited
2.1 发布配置文件
要发布默认配置文件,请执行以下命令
php artisan vendor:publish
您也可以只发布配置文件
php artisan vendor:publish --tag=config
如果您已经发布了 aerospike 文件,但由于某种原因想覆盖之前发布的文件,请添加 --force
标志。
3. 门面(可选)
为了使用 AerospikeCache
门面,您需要在 config/app.php
文件中注册它,您可以通过以下方式完成此操作
// config.php file // file START ommited 'aliases' => [ // other Facades ommited 'AerospikeCache' => Lucianojr\Aerospike\Facades\AerospikeFacade::class, ], // file END ommited