[Pkg-owncloud-commits] [owncloud] 404/457: Make "include update info" part of the cache key

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:06:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 5ca6ec7ead2966a1cad1213d898a326a9e315550
Author: Joas Schilling <nickvergessen at owncloud.com>
Date:   Mon Jun 15 10:04:13 2015 +0200

    Make "include update info" part of the cache key
---
 settings/controller/appsettingscontroller.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php
index a98d297..d64c945 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'];
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list