https://github.com/quantosobra/redis-service-provider
Redis service provider for Silex/Pimple using PhpRedis extension
https://github.com/quantosobra/redis-service-provider
Last synced: 2 months ago
JSON representation
Redis service provider for Silex/Pimple using PhpRedis extension
- Host: GitHub
- URL: https://github.com/quantosobra/redis-service-provider
- Owner: quantosobra
- License: mit
- Created: 2017-11-10T13:24:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-10T14:00:48.000Z (over 7 years ago)
- Last Synced: 2025-02-07T02:46:19.324Z (4 months ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Redis Service Provider
Redis service provider for Silex/Pimple using [PhpRedis](https://github.com/phpredis/phpredis) extension.
## Usage
Register the service provider in your application and configure Redis options:
```php
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](https://www.quantosobra.com.br) and licensed under the MIT license.
See the [LICENSE.md](LICENSE.md) file for the full license text.QuantoSobra © 2017