diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-01-09 18:31:39 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-01-09 19:49:59 +0100 |
commit | b8b4df5425e25403e77b108333faa2251b1348b3 (patch) | |
tree | 7dc2136658bcaff9b679799ae22c5e6acecc03fc /lib/private/ocsclient.php | |
parent | 59a1d16d0fd3d67833bfb728ce03cebc7fec4043 (diff) | |
download | nextcloud-server-b8b4df5425e25403e77b108333faa2251b1348b3.tar.gz nextcloud-server-b8b4df5425e25403e77b108333faa2251b1348b3.zip |
Cache responses from the AppStore server
Otherwise every time the AppStore was opened a lot of connections to the AppStore server were made which resulted in a terrible performance.
This changeset will cache the response for a sensible time so that only the first request will be somewhat slow.
Performance changes:
- Loading a category took previously more than 3 seconds on my machine. Now for every follow-up request it takes less than 200ms, resulting in a performance gain of 1950%
- Loading the category list took previously about 750ms - now it takes 154ms, a total performance gain of 395%
Diffstat (limited to 'lib/private/ocsclient.php')
-rw-r--r-- | lib/private/ocsclient.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php index 351027d8018..7ce6723128b 100644 --- a/lib/private/ocsclient.php +++ b/lib/private/ocsclient.php @@ -147,7 +147,7 @@ class OC_OCSClient{ $app['changed']=strtotime($tmp[$i]->changed); $app['description']=(string)$tmp[$i]->description; $app['score']=(string)$tmp[$i]->score; - $app['downloads'] = $tmp[$i]->downloads; + $app['downloads'] = (int)$tmp[$i]->downloads; $apps[]=$app; } |