iwai/phalcon-model-metadata-redis-adapter

Adapt to Redis the model metadata of Phalcon.

v1.0.1 2015-02-06 10:19 UTC

This package is not auto-updated.

Last update: 2024-04-13 14:34:33 UTC


README

Adapt to Redis the model metadata of Phalcon

Latest Stable Version Total Downloads Latest Unstable Version License

Usage

use Phalcon\Mvc\Application;
use Iwai\Phalcon\Mvc\Model\MetaData\Redis as MetaDataRedis;

$app = new Application();

$app->getDI()->setShared('modelsMetadata', function () {
    return new MetaDataRedis([
        'host' => '127.0.0.1',
        'port' => 6379,
    ]);
});

Options

host

Redis server host

port

Redis server port

prefix

Set hset prefix key for Redis (default __metadata)

lifetime

Set timeout for cache (default 3600 sec)