diff options
author | Andreas Gohr <andi@splitbrain.org> | 2024-12-17 12:07:22 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2024-12-17 12:11:21 +0100 |
commit | 01b2a2823dcc82af6193cb9ea39d835e2a85f9e2 (patch) | |
tree | 6292863654c42c57119e13ed1c41fd70abba4cda /lib/plugins/extension/Repository.php | |
parent | dc19220032f21053c2bd43e0c265c24a51c90f33 (diff) | |
download | dokuwiki-01b2a2823dcc82af6193cb9ea39d835e2a85f9e2.tar.gz dokuwiki-01b2a2823dcc82af6193cb9ea39d835e2a85f9e2.zip |
initialize remote data in one go
Previously each extension was fetched separately from the API, this
fetches all installed ones in one go, speeding up the first open on cold
cache significantly.
Diffstat (limited to 'lib/plugins/extension/Repository.php')
-rw-r--r-- | lib/plugins/extension/Repository.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/plugins/extension/Repository.php b/lib/plugins/extension/Repository.php index 20130f8fb..2cda2480d 100644 --- a/lib/plugins/extension/Repository.php +++ b/lib/plugins/extension/Repository.php @@ -135,7 +135,7 @@ class Repository // first get all that are cached foreach ($ids as $id) { $data = $this->retrieveCache($id); - if ($data === null) { + if ($data === null || $data === []) { $toload[] = $id; } else { $result[$id] = Extension::createFromRemoteData($data); @@ -147,7 +147,7 @@ class Repository $this->fetchExtensions($toload); foreach ($toload as $id) { $data = $this->retrieveCache($id); - if ($data === null) { + if ($data === null || $data === []) { $result[$id] = null; } else { $result[$id] = Extension::createFromRemoteData($data); |