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 /settings/application.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 'settings/application.php')
-rw-r--r-- | settings/application.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/settings/application.php b/settings/application.php index 070da8024b2..f7ba72f3bfc 100644 --- a/settings/application.php +++ b/settings/application.php @@ -55,7 +55,8 @@ class Application extends App { $c->query('AppName'), $c->query('Request'), $c->query('L10N'), - $c->query('Config') + $c->query('Config'), + $c->query('ICacheFactory') ); }); $container->registerService('SecuritySettingsController', function(IContainer $c) { @@ -120,6 +121,9 @@ class Application extends App { $container->registerService('Config', function(IContainer $c) { return $c->query('ServerContainer')->getConfig(); }); + $container->registerService('ICacheFactory', function(IContainer $c) { + return $c->query('ServerContainer')->getMemCacheFactory(); + }); $container->registerService('L10N', function(IContainer $c) { return $c->query('ServerContainer')->getL10N('settings'); }); |