https://github.com/oefenweb/cakephp-redis
Redis (DataSource) Plugin for CakePHP
https://github.com/oefenweb/cakephp-redis
cakephp cakephp2 datasource php plugin redis
Last synced: 7 months ago
JSON representation
Redis (DataSource) Plugin for CakePHP
- Host: GitHub
- URL: https://github.com/oefenweb/cakephp-redis
- Owner: Oefenweb
- License: mit
- Created: 2014-08-01T14:06:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-01-23T12:26:36.000Z (about 7 years ago)
- Last Synced: 2025-07-06T01:22:42.064Z (8 months ago)
- Topics: cakephp, cakephp2, datasource, php, plugin, redis
- Language: PHP
- Homepage:
- Size: 30.3 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Redis plugin for CakePHP
[](https://travis-ci.org/Oefenweb/cakephp-redis)
[](https://travis-ci.org/Oefenweb/cakephp-redis)
[](https://codecov.io/gh/Oefenweb/cakephp-redis)
[](https://packagist.org/packages/oefenweb/cakephp-redis)
[](https://codeclimate.com/github/Oefenweb/cakephp-redis)
[](https://scrutinizer-ci.com/g/Oefenweb/cakephp-redis/?branch=master)
Redis (DataSource) Plugin for CakePHP
## Requirements
* CakePHP 2.9.0 or greater.
* PHP 7.0.0 or greater.
* PhpRedis.
## Installation
### Clone
* Clone/Copy the files in this directory into `app/Plugin/Redis`
### Composer
* Ensure `require` is present in `composer.json`. This will install the plugin into `app/Plugin/Redis`:
```json
{
"require": {
"oefenweb/cakephp-redis": "dev-master"
}
}
```
## Configuration
* Ensure the plugin is loaded in `app/Config/bootstrap.php` by calling:
```php
CakePlugin::load('Redis');
```
* Ensure the plugin is configured in `app/Config/database.php` by specifying:
```php
'Redis.RedisSource',
'host' => '127.0.0.1',
'port' => 6379,
'password' => '',
'database' => 0,
'timeout' => 0,
'persistent' => false,
'unix_socket' => '',
'prefix' => '',
];
```
## Usage
Get a (connected / configured) `Redis` instance:
```php
ping();
```