mirror of
https://github.com/friendica/friendica
synced 2025-04-24 16:30:10 +00:00
Redis:
- added support for redis server: // Required to actually have this cache driver active: $a->config['system']['cache_driver'] = 'redis'; // ---- OPTIONAL/DEFAULT: ---- $a->config['system']['redis_host'] = '127.0.0.1'; $a->config['system']['redis_port'] = 6379; Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
69ac6feff7
commit
751394fc1d
2 changed files with 83 additions and 0 deletions
|
@ -40,6 +40,12 @@ class Cache extends \Friendica\BaseObject
|
|||
|
||||
self::$driver = new Cache\MemcachedCacheDriver($memcached_hosts);
|
||||
break;
|
||||
case 'redis':
|
||||
$redis_host = Config::get('system', 'redis_host', '127.0.0.1');
|
||||
$redis_port = Config::get('system', 'redis_port', 6379);
|
||||
|
||||
self::$driver = new Cache\RedisCacheDriver($redis_host, $redis_port);
|
||||
break;
|
||||
default:
|
||||
self::$driver = new Cache\DatabaseCacheDriver();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue