kba-team/cakephp-predis

Predis cache engine for CakePHP

Installs: 10 518

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 1

Type:cakephp-plugin

v2.1.0 2023-12-14 11:38 UTC

This package is auto-updated.

Last update: 2024-04-04 14:14:12 UTC


README

License: MIT Packagist Version

Graylog log engine for CakePHP 2.x

Usage

composer require kba-team/cakephp-predis

In bootstrap.php load the Plugin ...

CakePlugin::load("PredisCache");

In your config file ...

Cache::config('_session_', [
    'engine' => 'PredisCache.Predis',
    'sentinel' => ['<sentinel host 1>', ...., '<sentinel host n>'],
    'password' => "<password>",
    'port' => 26379,
    'exceptions' => true,
    'database' => 1,
    'prefix' => "",
    'duration' => '+2 days', 
]);

Possible configuration parameters are:

  • engine Predis
  • scheme Currently, TCP only
  • prefix See CakePhp 2.x Caching
  • server Redis server (must be master),
  • sentinel List of sentinel nodes (hostnames or IP addresses)
  • port Either redis Port (6379) is server is used otherwise the sentinel port (26379)
  • exceptions Should exceptions be thrown or not (true)
  • database See CakePhp 2.x Caching => 0,
  • password Redis password
  • service Sentinel only: Sentinel service name (mymaster)

Further reading