Created
February 2, 2017 19:32
-
-
Save DragonBe/4b62807197847e33499fb2b851bfad50 to your computer and use it in GitHub Desktop.
Zend Framework configuration for Redis cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'caches' => [ | |
'cache_longterm' => [ | |
'adapter' => \Zend\Cache\Storage\Adapter\Redis::class, | |
'options' => [ | |
'server' => [ | |
'host' => getenv('APP_REDIS_HOST'), | |
'port' => getenv('APP_REDIS_PORT'), | |
], | |
'password' => getenv('APP_REDIS_AUTH'), | |
'lib_options' => [ | |
Redis::OPT_SERIALIZER => Redis::SERIALIZER_PHP, | |
], | |
], | |
'ttl' => 86400, //Cache for 24hrs | |
'plugins' => [ | |
'exception_handler' => [ | |
'throw_exceptions' => false, | |
], | |
], | |
], | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment