From: Maximilian Mader Date: Fri, 29 May 2015 01:02:07 +0000 (+0200) Subject: Add version number to RedisCacheSource in CacheListPage X-Git-Tag: 3.0.0_Beta_1~2305^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b77f5745ddeddf42e464408e7490d6b334736ef;p=GitHub%2FWoltLab%2FWCF.git Add version number to RedisCacheSource in CacheListPage --- diff --git a/CHANGELOG.md b/CHANGELOG.md index a0db772df3..992913aef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,4 @@ * `wcf\system\event\listener\PreParserAtUserListener` removed. * `wcf\action\AJAXProxyAction::getData()` removed. * Version system removed. +* `wcf\system\cache\source\RedisCacheSource` added. diff --git a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php index 493e5b022d..ea7a7f5a62 100755 --- a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php @@ -82,6 +82,11 @@ class CacheListPage extends AbstractPage { // set version $this->cacheData['version'] = WCF_VERSION; break; + + case 'wcf\system\cache\source\RedisCacheSource': + // set version + $this->cacheData['version'] = 'Redis '.CacheHandler::getInstance()->getCacheSource()->getRedisVersion(); + break; } $this->readCacheFiles('language', FileUtil::unifyDirSeparator(WCF_DIR.'language')); diff --git a/wcfsetup/install/files/lib/system/cache/source/RedisCacheSource.class.php b/wcfsetup/install/files/lib/system/cache/source/RedisCacheSource.class.php index 209d181c27..5c373e5ecb 100644 --- a/wcfsetup/install/files/lib/system/cache/source/RedisCacheSource.class.php +++ b/wcfsetup/install/files/lib/system/cache/source/RedisCacheSource.class.php @@ -184,4 +184,15 @@ class RedisCacheSource implements ICacheSource { return $flush.':'.$cacheName; } + + /** + * Returns the Redis server version + * + * @return string + */ + public function getRedisVersion() { + $info = $this->redis->info('server'); + + return $info['redis_version']; + } }