diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-15 10:04:13 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-15 10:04:13 +0200 |
commit | 5ca6ec7ead2966a1cad1213d898a326a9e315550 (patch) | |
tree | 3b8720520de3513fbd42b0915ed0f04b8e2f43f3 /settings | |
parent | 580155abe716dd9fb385823819c473313c4e3dd1 (diff) | |
download | nextcloud-server-5ca6ec7ead2966a1cad1213d898a326a9e315550.tar.gz nextcloud-server-5ca6ec7ead2966a1cad1213d898a326a9e315550.zip |
Make "include update info" part of the cache key
Diffstat (limited to 'settings')
-rw-r--r-- | settings/controller/appsettingscontroller.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php index a98d297a122..d64c945c02c 100644 --- a/settings/controller/appsettingscontroller.php +++ b/settings/controller/appsettingscontroller.php @@ -152,8 +152,10 @@ class AppSettingsController extends Controller { * @return array */ public function listApps($category = 0, $includeUpdateInfo = true) { - if(!is_null($this->cache->get('listApps-'.$category))) { - $apps = $this->cache->get('listApps-'.$category); + $cacheName = 'listApps-' . $category . '-' . (int) $includeUpdateInfo; + + if(!is_null($this->cache->get($cacheName))) { + $apps = $this->cache->get($cacheName); } else { switch ($category) { // installed apps @@ -241,7 +243,7 @@ class AppSettingsController extends Controller { return $app; }, $apps); - $this->cache->set('listApps-'.$category, $apps, 300); + $this->cache->set($cacheName, $apps, 300); return ['apps' => $apps, 'status' => 'success']; } |