исправление бага с кешированием.

This commit is contained in:
2024-09-19 00:24:36 +03:00
parent 660a410a05
commit 54d86d6e4d
7 changed files with 25 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
package Visual_DVM_2021.Passes;
import Common.Current;
import Common.Global;
import Common.UI.UI;
import Common.UI.VisualCache.ConfigurationCache;
import Common.UI.VisualCache.VisualCaches;
import Common.Utils.Utils;
@@ -45,8 +46,5 @@ public abstract class SaveCurrentConfiguration<C extends Configuration> extends
target.saveTestsAsJson(tests);
//--
super.ServerAction();
//--
// ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(target);
// System.out.println(Utils.Brackets(cache.groupsDescriptions));
}
}

View File

@@ -12,11 +12,6 @@ public class DeleteServerObject<S extends RepositoryServer, D extends DBObject>
target = (D) getDb().tables.get(d).getCurrent();
return getDb().tables.get(d).CheckCurrent(Log) && getDb().tables.get(d).ShowDeleteObjectDialog(target);
}
@Override
protected void performPreparation() throws Exception {
super.performPreparation();
VisualCaches.DeleteCache(target);
}
//Очищаем все связанные таблицы, чтобы не допустить перерисовки во время удаления объекта.
@Override
protected void showPreparation() throws Exception {
@@ -38,6 +33,7 @@ public class DeleteServerObject<S extends RepositoryServer, D extends DBObject>
@Override
protected void ServerAction() throws Exception {
DeleteObject(target);
VisualCaches.DeleteCache(target);
}
@Override
protected void showDone() throws Exception {

View File

@@ -48,13 +48,6 @@ public class DeleteServerObjects <S extends RepositoryServer, D extends DBObject
return false;
}
}
@Override
protected void performPreparation() throws Exception {
super.performPreparation();
for (Object key: target){
VisualCaches.DeleteCache(d, key);
}
}
//Очищаем все связанные таблицы, чтобы не допустить перерисовки во время удаления объекта.
@Override
protected void showPreparation() throws Exception {
@@ -78,5 +71,8 @@ public class DeleteServerObjects <S extends RepositoryServer, D extends DBObject
protected void performFinish() throws Exception {
super.performFinish();
passes.get(getDb().getSynchronizePassCode()).Do();
for (Object key: target){
VisualCaches.DeleteCache(d, key);
}
}
}

View File

@@ -14,12 +14,6 @@ public class EditServerObject<S extends RepositoryServer, D extends DBObject> ex
target = (D) getDb().tables.get(d).getCurrent();
return getDb().tables.get(d).CheckCurrent(Log) && getDb().tables.get(d).ShowEditObjectDialog(target);
}
@Override
protected void performPreparation() throws Exception {
super.performPreparation();
//очистить кэш.
VisualCaches.DeleteCache(target);
}
//--
public EditServerObject(S server_in, Class<D> d_in) {
super(server_in, d_in);
@@ -31,6 +25,7 @@ public class EditServerObject<S extends RepositoryServer, D extends DBObject> ex
}
@Override
protected void showDone() throws Exception {
VisualCaches.RefreshCache(target);
getDb().tables.get(d).ui_.Show(target.getPK());
}
}