b8b4df5425
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%
18 lines
462 B
PHP
18 lines
462 B
PHP
<?php
|
|
OCP\JSON::checkAdminUser();
|
|
OCP\JSON::callCheck();
|
|
|
|
if (!array_key_exists('appid', $_POST)) {
|
|
OC_JSON::error();
|
|
exit;
|
|
}
|
|
|
|
$appId = $_POST['appid'];
|
|
$appId = OC_App::cleanAppId($appId);
|
|
|
|
// FIXME: Clear the cache - move that into some sane helper method
|
|
\OC::$server->getMemCacheFactory()->create('settings')->remove('listApps-0');
|
|
\OC::$server->getMemCacheFactory()->create('settings')->remove('listApps-1');
|
|
|
|
OC_App::disable($appId);
|
|
OC_JSON::success();
|