Package Data | |
---|---|
Maintainer Username: | makbulut |
Maintainer Contact: | mehmetakbulut.mail@gmail.com (Mehmet Akbulut) |
Package Create Date: | 2017-03-26 |
Package Last Update: | 2018-07-05 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-25 15:03:13 |
Package Statistics | |
---|---|
Total Downloads: | 2,059 |
Monthly Downloads: | 5 |
Daily Downloads: | 0 |
Total Stars: | 10 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 1 |
Aerospike Cache driver for Laravel 5. This package makes it easy to store cached data in Aerospike.
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:
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
Setup service provider in config/app.php
Makbulut\Aerospike\AerospikeServiceProvider::class
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
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.
This package is open-sourced software licensed under the MIT license