Skip to content

Redis service provider for Silex/Pimple using PhpRedis extension

License

Notifications You must be signed in to change notification settings

quantosobra/redis-service-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redis Service Provider

Redis service provider for Silex/Pimple using PhpRedis extension.

Usage

Register the service provider in your application and configure Redis options:

use QuantoSobra\Silex\Redis\RedisServiceProvider;

$app->register(new RedisServiceProvider(), [
    RedisServiceProvider::REDIS_OPTIONS => [
        RedisServiceProvider::OPT_HOST => 'localhost',
        RedisServiceProvider::OPT_PORT => 6379,
        RedisServiceProvider::OPT_TIMEOUT => 30,
        RedisServiceProvider::OPT_PERSISTENT => true,
        RedisServiceProvider::OPT_AUTH => 'pas$word',
        RedisServiceProvider::OPT_SERIALIZER => \Redis::SERIALIZER_NONE, // or \Redis::SERIALIZER_PHP or \Redis::SERIALIZER_IGBINARY
        RedisServiceProvider::OPT_PREFIX => 'myprefix:',
        RedisServiceProvider::OPT_DATABASE => 0
    ]
]);

License

This project is developed at QuantoSobra and licensed under the MIT license. See the LICENSE.md file for the full license text.

QuantoSobra © 2017

About

Redis service provider for Silex/Pimple using PhpRedis extension

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages