Cache app versions

This commit is contained in:
Robin Appelman 2015-02-03 14:13:44 +01:00
parent a24d73aa0c
commit 70fd3a267f
1 changed files with 6 additions and 2 deletions

View File

@ -34,6 +34,7 @@ use OC\App\Platform;
* upgrading and removing apps.
*/
class OC_App {
static private $appVersion = [];
static private $settingsForms = array();
static private $adminForms = array();
static private $personalForms = array();
@ -600,8 +601,11 @@ class OC_App {
* @return string
*/
public static function getAppVersion($appId) {
if (!isset(self::$appVersion[$appId])) {
$file = self::getAppPath($appId);
return ($file !== false) ? self::getAppVersionByPath($file) : '0';
self::$appVersion[$appId] = ($file !== false) ? self::getAppVersionByPath($file) : '0';
}
return self::$appVersion[$appId];
}
/**