@@ -89,18 +89,20 @@ and ``RedisProxy``:
8989 Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler :
9090 arguments :
9191 - ' @Redis'
92- # you can optionally pass an array of options. The only option is 'prefix',
93- # which defines the prefix to use for the keys to avoid collision on the Redis server
94- # - { prefix: 'my_prefix' }
92+ # you can optionally pass an array of options. The only options are 'prefix' and 'ttl',
93+ # which define the prefix to use for the keys to avoid collision on the Redis server
94+ # and the expiration time for any given entry (in seconds), defaults are 'sf_s' and null:
95+ # - { 'prefix' => 'my_prefix', 'ttl' => 600 }
9596
9697 .. code-block :: xml
9798
9899 <!-- config/services.xml -->
99100 <services >
100101 <service id =" Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler" >
101102 <argument type =" service" id =" Redis" />
102- <!-- you can optionally pass an array of options. The only option is 'prefix',
103- which defines the prefix to use for the keys to avoid collision on the Redis server:
103+ <!-- you can optionally pass an array of options. The only options are 'prefix' and 'ttl',
104+ which define the prefix to use for the keys to avoid collision on the Redis server
105+ and the expiration time for any given entry (in seconds), defaults are 'sf_s' and null:
104106 <argument type="collection">
105107 <argument key="prefix">my_prefix</argument>
106108 </argument> -->
@@ -116,9 +118,10 @@ and ``RedisProxy``:
116118 ->register(RedisSessionHandler::class)
117119 ->addArgument(
118120 new Reference('Redis'),
119- // you can optionally pass an array of options. The only option is 'prefix',
120- // which defines the prefix to use for the keys to avoid collision on the Redis server:
121- // ['prefix' => 'my_prefix'],
121+ // you can optionally pass an array of options. The only options are 'prefix' and 'ttl',
122+ // which define the prefix to use for the keys to avoid collision on the Redis server
123+ // and the expiration time for any given entry (in seconds), defaults are 'sf_s' and null:
124+ // ['prefix' => 'my_prefix', 'ttl' => 600],
122125 );
123126
124127 Next, use the :ref: `handler_id <config-framework-session-handler-id >`
0 commit comments