Add version number to RedisCacheSource in CacheListPage
authorMaximilian Mader <max@bastelstu.be>
Fri, 29 May 2015 01:02:07 +0000 (03:02 +0200)
committerMaximilian Mader <max@bastelstu.be>
Fri, 29 May 2015 13:24:36 +0000 (15:24 +0200)
CHANGELOG.md
wcfsetup/install/files/lib/acp/page/CacheListPage.class.php
wcfsetup/install/files/lib/system/cache/source/RedisCacheSource.class.php

index a0db772df36aea81ce1c47c82043e130e5fd97c4..992913aef8d02bc22958bbd40beb30452dd11703 100644 (file)
@@ -19,3 +19,4 @@
 * `wcf\system\event\listener\PreParserAtUserListener` removed.
 * `wcf\action\AJAXProxyAction::getData()` removed.
 * Version system removed.
+* `wcf\system\cache\source\RedisCacheSource` added.
index 493e5b022d4c21e02c52581b6e25c9d34b7f7d49..ea7a7f5a6257ad4dd0ca9759193ae86fb8ea642d 100755 (executable)
@@ -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'));
index 209d181c2724613272518990a641149661fa133b..5c373e5ecb0e1af0a14016198dab93ba8dde7cee 100644 (file)
@@ -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'];
+       }
 }