-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Hi,
I try to set this redis option in my provider declaration :
- host
- port
- password
but It doesn't work, I got this error
Uncaught exception 'RuntimeException' with message 'Host and port options need to be specified for redis cache'
Where I have to set this option ?
Thanks for your answers.
I try this :
$app->register(new DoctrineOrmServiceProvider(), array(
'orm.proxies_dir' => __DIR__."/../../cache/doctrineProxies",
'orm.proxies_namespace' => $app['env'],
'orm.auto_generate_proxies' => $app['debug'],
'orm.default_cache' => getenv('REDIS_CACHE') ? 'redis' : 'array',
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT'),
'password' => getenv('REDIS_PASSWORD'),
'orm.em.options' => array(
'cache_namespace' => $app['env'].'_',
'mappings' => array(
array(
'type' => 'annotation',
'namespace' => 'Models',
'path' => '',
),
),
),
));also this
$app->register(new DoctrineOrmServiceProvider(), array(
'orm.proxies_dir' => __DIR__."/../../cache/doctrineProxies",
'orm.proxies_namespace' => $app['env'],
'orm.auto_generate_proxies' => $app['debug'],
'orm.default_cache' => getenv('REDIS_CACHE') ? 'redis' : 'array',
'orm.em.options' => array(
'cache_namespace' => $app['env'].'_',
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT'),
'password' => getenv('REDIS_PASSWORD'),
'mappings' => array(
array(
'type' => 'annotation',
'namespace' => 'Models',
'path' => '',
),
),
),
));Metadata
Metadata
Assignees
Labels
No labels