kgbph / cakephp-redis-cluster
Redis cluster cache storage plugin for CakePHP
Installs: 113
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Type:cakephp-plugin
Requires
- php: >=7.4
- ext-intl: *
- ext-redis: *
- cakephp/cakephp: ~3.8.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.8
- cakephp/cakephp-codesniffer: ^3.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^0.12.83
- phpstan/phpstan-deprecation-rules: ^0.12.6
- phpunit/phpunit: ^5|^6
This package is auto-updated.
Last update: 2024-05-20 09:39:50 UTC
README
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require kgbph/cakephp-redis-cluster
Usage
Use as a cache engine. See CakePHP Caching.
Cache::setConfig('redis', [ 'className' => 'Kgbph/RedisCluster.RedisCluster', 'nodes' => [ 'redis-node-0:6379', 'redis-node-1:6379', 'redis-node-2:6379', 'redis-node-3:6379', 'redis-node-4:6379', 'redis-node-5:6379', ], ]);
Options
Name | Type | default | Description |
---|---|---|---|
duration | int | 3600 | Specify how long items last |
failover | string | null | null | Automatic slave failover mode |
groups | string[] | [] | List of associated groups or 'tags' |
name | string | null | null | Redis cluster name |
nodes | string[] | [] | URL or IP of the Redis cluster nodes |
persistent | bool | true | Use persistent connection |
prefix | string | 'cake_' | Prefix prepended to all entries |
read_timeout | float | 0 | Read timeout in seconds |
timeout | float | 0 | Timeout in seconds |
Code quality checks
PHP CodeSniffer
Execute composer cs-check
inside the PHP container.
PHP Static Analysis Tool
Execute composer stan
inside the PHP container.
PHPUnit
Execute composer test
inside the PHP container.
Run all checks
Execute composer check
inside the PHP container.