1
0
Fork 0
mirror of synced 2024-07-01 04:30:59 +12:00

Merge pull request #697 from appwrite/fix-redis-persistent-connection

Fix for redis persistent connection
This commit is contained in:
Eldad A. Fux 2020-10-21 22:20:55 +03:00 committed by GitHub
commit 7264be4ac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,8 +166,8 @@ $register->set('statsd', function () { // Register DB connection
});
$register->set('cache', function () { // Register cache connection
$redis = new Redis();
$redis->pconnect(App::getEnv('_APP_REDIS_HOST', '', 2.5),
App::getEnv('_APP_REDIS_PORT', ''));
$redis->pconnect(App::getEnv('_APP_REDIS_HOST', ''), App::getEnv('_APP_REDIS_PORT', ''));
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
return $redis;
});