mirror of
https://github.com/outline/outline.git
synced 2026-11-27 07:58:51 +03:00
perf: Load templates on demand, add fetchAllIfNeeded to stores (#13895)
* perf: Load templates on demand and cache fetchAll results fetchAll on the base store now returns the first result for repeat calls with the same params, with a force option for callers that need fresh data. Templates load when the command bar, document header, or block menu needs them instead of on every page load. * Make fetchAll caching opt-in via fetchAllIfNeeded fetchAll always fetches again. fetchAllIfNeeded returns the previous result for the same params until a model is added to or removed from the store. Mount-effect callers for reference lists use it.
This commit is contained in:
1 parent
aacc98475d
commit
0e704e6ed2
11 files changed
+67
-17
No files matched your search
@@ -32,7 +32,7 @@ function GitHub() {
|
||||
const githubAppName = env.GITHUB_APP_NAME;
|
||||
|
||||
React.useEffect(() => {
|
||||
void integrations.fetchAll({
|
||||
void integrations.fetchAllIfNeeded({
|
||||
service: IntegrationService.GitHub,
|
||||
withRelations: true,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user