Browse Source

REPORT-137327 - 远程设计下切换目录卡顿优化 修改缓存机制

fbp/merge
Destiny.Lin 2 months ago
parent
commit
72dad56e8e
  1. 8
      designer-realize/src/main/java/com/fanruan/boot/env/function/DesignDatasourceComponent.java
  2. 4
      designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java

8
designer-realize/src/main/java/com/fanruan/boot/env/function/DesignDatasourceComponent.java vendored

@ -91,8 +91,8 @@ public class DesignDatasourceComponent extends DatasourceComponent {
ParameterTypeHandler.getInstance().addParser(ParameterType.JSONArray.name(), new MultiParameterParser());
ParameterTypeHandler.getInstance().addParser(ParameterType.Formula.name(), new FormulaParameterParser());
ParameterTypeHandler.getInstance().addParser(ParameterType.TableColumn.name(), new TableColumnParameterParser());
TableDataRepository.getInstance().start();
ConnectionRepository.getInstance().start();
TableDataRepository.getInstance().startUseCache();
ConnectionRepository.getInstance().startUseCache();
}
private void registerDriverClassLoader() {
@ -106,8 +106,8 @@ public class DesignDatasourceComponent extends DatasourceComponent {
*/
@Stop
public void stop() {
ConnectionRepository.getInstance().stop();
TableDataRepository.getInstance().stop();
ConnectionRepository.getInstance().stopUseCache();
TableDataRepository.getInstance().stopUseCache();
}
/**

4
designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java vendored

@ -37,7 +37,7 @@ public class DesignAppComponent {
JTemplateFactory.register(app);
}
PluginRemote.getInstance().start();
RemoteAuthorityRepository.getInstance().start();
RemoteAuthorityRepository.getInstance().startUseCache();
}
/**
@ -45,7 +45,7 @@ public class DesignAppComponent {
*/
@Stop
public void stop() {
RemoteAuthorityRepository.getInstance().stop();
RemoteAuthorityRepository.getInstance().stopUseCache();
List<App> appList = new ArrayList<>(Carina.getApplicationContext().group(AppGroup.class).getAll());
for (App app : appList) {
JTemplateFactory.remove(app);

Loading…
Cancel
Save