2017 © Pedro Peláez
 

jelix-module php-redis-plugin

Redis plugins for Jelix, using a pure PHP Redis API

image

jelix/php-redis-plugin

Redis plugins for Jelix, using a pure PHP Redis API

  • Friday, January 26, 2018
  • by laurentj
  • Repository
  • 1 Watchers
  • 0 Stars
  • 465 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 10 % Grown

The README.md

Plugins for Jelix to access to Redis through jKVDb (the nosql API of Jelix) and jCache., (*1)

These plugins are using the library php-redis, a pure PHP library to connect to Redis., (*2)

You may want to use these plugins if you cannot use Redis plugins provided into Jelix 1.7+, that use the API of the Redis extension., (*3)

These plugins are for Jelix 1.7.x and higher. See the jelix/jelix repository to see their history before Jelix 1.7., (*4)

installation

Install it by hands like any other Jelix plugins, or use Composer if you installed Jelix 1.7+ with Composer., (*5)

In your project:, (*6)

composer require "jelix/php-redis-plugin"

You can use the plugins. There name is "redis_php"., (*7)

configuration

For the configuration, indicate a host and a port parameter in the profiles.ini.php file. The db parameter is optional (default is 0) and should indicate the number of the database to use into Redis., (*8)

Example of profiles:, (*9)

; for jkvdb
[jkvdb:myredis]
driver=redis_php
host = localhost
port = 6379
db=3

; for jcache
[jcache:myredis]
driver=redis_php
host = localhost
port = 6379

This driver supports the jIKVttl interface., (*10)

Other parameter configuration:, (*11)

  • key_prefix: indicate a name in it, and all keys will be prepend by this name
  • key_prefix_flush_method: when a key_prefix is set, indicates how the flush should be made, as deletion can be very expensive in resources. Possible values are
    • direct: keys are directly deleted, one after one. Warning: this can be very time expensive. Use it only if you know you are using only few keys.
    • jcacheredisworker for a jCache profile, or jkvdbredisworker for a jKvDb driver: It pushes the prefix into a 'list' value in Redis. Keys then should be delete by an other process/worker. Such worker is provided in jelix (see lib/jelix/core-modules/jelix/controllers/redisworker.cmdline.php)
    • event: a jelix event is notified (jCacheRedisFlushKeyPrefix for jCache, or jKvDbRedisFlushKeyPrefix for jKvDb). Up to you to create a listener that will delete the keys in the manner you want. Event parameters: prefix indicates the prefix of keys to delete, profile indicate the jCache/jKvdb to use for the connection.

unit tests

Unit tests are in Testapp, in the jelix/jelix repository., (*12)

The Versions

26/01 2018

dev-master

9999999-dev http://jelix.org

Redis plugins for Jelix, using a pure PHP Redis API

  Sources   Download

LGPL-2.1 LGPL-2.1-or-later

The Requires

 

redis jelix jkvdb jcache

26/01 2018

1.7.6

1.7.6.0 http://jelix.org

Redis plugins for Jelix, using a pure PHP Redis API

  Sources   Download

LGPL-2.1

The Requires

 

redis jelix jkvdb jcache

12/02 2017

1.7.5

1.7.5.0 http://jelix.org

Redis plugins for Jelix, using a pure PHP Redis API

  Sources   Download

LGPL-2.1

The Requires

 

redis jelix jkvdb jcache

20/05 2016

1.7.4

1.7.4.0 http://jelix.org

a Redis plugin for Jelix

  Sources   Download

LGPL-2.1

redis jelix jkvdb

09/05 2016

1.7.3

1.7.3.0 http://jelix.org

a Redis plugin for Jelix

  Sources   Download

LGPL-2.1

redis jelix jkvdb

09/05 2016

1.7.2

1.7.2.0 http://jelix.org

a Redis plugin for Jelix

  Sources   Download

LGPL-2.1

redis jelix jkvdb

21/05 2015

1.7.1

1.7.1.0 http://jelix.org

a Redis plugin for Jelix

  Sources   Download

LGPL-2.1

redis jelix jkvdb

21/05 2015

1.7.0

1.7.0.0 http://jelix.org

module providing a Redis plugin for jKVDb into a Jelix application.

  Sources   Download

LGPL-2.1

redis jelix jkvdb