makbulut/laravel-aerospike 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

makbulut/laravel-aerospike

最新稳定版本:v1.3

Composer 安装命令:

composer require makbulut/laravel-aerospike

包简介

Aerospike cache driver for Laravel

README 文档

README

Aerospike Cache driver for Laravel 5. This package makes it easy to store cached data in Aerospike.

📦 Installation

Make sure you have the Aerospike PHP client installed. You can find installation instructions at http://www.aerospike.com/docs/client/php/install

To install this package you will need:

  • Laravel 5.0+
  • PHP 5.5.9+

You must then modify your composer.json file and run composer update to include the latest version of the package in your project.

"require": {
    "makbulut/laravel-aerospike": "1.3"
}

Or you can run the composer require command from your terminal.

composer require makbulut/laravel-aerospike:1.3

🔧 Configuration

Provider

Setup service provider in config/app.php

Makbulut\Aerospike\AerospikeServiceProvider::class

Environment

Change the cache driver in .env to aerospike:

CACHE_DRIVER=aerospike

Add aerospike server informations to .env file.

AEROSPIKE_HOST=172.28.128.3
AEROSPIKE_PORT=3000
AEROSPIKE_NAMESPACE=test

📌 Usage

Cache::store('aerospike')->get('key_1');
Cache::store('aerospike')->put('key_1', 1, 5 );
Cache::store('aerospike')->increment('rest_1', 1);
Cache::store('aerospike')->decrement('rest_1', 1);
Cache::store('aerospike')->forever('key_1', 1);
Cache::store('aerospike')->forget('key_1');
Cache::store('aerospike')->flush('test');

Or

Cache::get('key_1');
Cache::put('key_1', 1, 5 );
Cache::increment('rest_1', 1);
Cache::decrement('rest_1', 1);
Cache::forever('key_1', 1);
Cache::forget('key_1');
Cache::flush('test');

For more information about Caches, check http://laravel.com/docs/cache.

📄 License

This package is open-sourced software licensed under the MIT license

统计信息

  • 总下载量: 2.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-30