services:
    _defaults:
        autowire: true
        autoconfigure: true
    Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler:
        arguments:
            - '@snc_redis.session'
            - { 'ttl': 3600 }

# Define your clients here. The example below connects to database 0 of the default Redis server.
#
# See https://github.com/snc/SncRedisBundle/blob/master/docs/README.md for instructions on
# how to configure the bundle.
snc_redis:
    clients:
        default:
            type: phpredis
            alias: default
            dsn: "%env(REDIS_URL)%"
            logging: '%kernel.debug%'

        # use in framework.
        session:
            type: phpredis
            alias: session
            dsn: "%env(REDIS_URL)%/1"
            logging: '%kernel.debug%'
