[ZF3][Application Skeleton] Session Cache save handler configuration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[ZF3][Application Skeleton] Session Cache save handler configuration

Jamie Krasnoo
Hey all,

I hope this is the right list to ask at. If not, my bad, please point me in
the right direction.

I'm just getting used to ZF3 and the Application Skeleton. I've figured out
the session config and I'm able to get it going. However I'd like to use
Redis as a save handler and looking through the code I need to inject an
instance of Zend\Session\SaveHandler\Cache in to SessionManager. Can I do
this through the configs or do I need to go through a Module::onBootstrap?
I can't seem to find a config example in the docs. Could someone please
point me in the right direction?

Regards,

Jamie
Reply | Threaded
Open this post in threaded view
|

Re: [ZF3][Application Skeleton] Session Cache save handler configuration

jerome
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Jamie Krasnoo wrote
I'd like to use Redis as a save handler
this can be achieved

the PHP way :

ini_set('session.save_handler', 'redis');
ini_set('session.save_path',    'tcp://blabla.com:6379?weight=1&timeout=2.5&database=1');


the ZF3 way


    'session_config' => array(


        'php_save_handler'  => 'redis', // "redis" requires PhpRedis extension
        'save_path'        => 'tcp://127.0.0.1:6379?prefix=ZF_REDIS_SESSION',

You are welcome to update the official documentation
hope this helps