очистка отладочной печати. тоже кое-что накопилось.

This commit is contained in:
2025-01-29 14:08:57 +03:00
parent 8c9835f8fd
commit f5e411c827
15 changed files with 36 additions and 40 deletions

View File

@@ -35,18 +35,14 @@ public class VisualCaches {
VisualCache res = null;
LinkedHashMap<Object, VisualCache> data = getDataForClass(object.getClass());
if (!data.containsKey(object.getPK())) {
// System.out.println("get visual cache for " + object.getPK()+" "+object.getClass());
// System.out.println("cache not found, creating...");
data.put(object.getPK(), res = createCache(object));
} else {
// System.out.println("cache found");
res = data.get(object.getPK());
}
return res;
}
//Принудительно удалить старый и записать новый.
public static void RefreshCache(DBObject object) {
// System.out.println("refresh cache for " + object.getPK()+" "+object.getClass().getSimpleName());
LinkedHashMap<Object, VisualCache> data = getDataForClass(object.getClass());
//--
if (data.containsKey(object.getPK())) {
@@ -58,7 +54,6 @@ public class VisualCaches {
DeleteCache(object.getClass(), object.getPK());
}
public static void DeleteCache(Class class_, Object pk) {
// System.out.println("Delete cache for " + pk+" "+class_);
LinkedHashMap<Object, VisualCache> data = getDataForClass(class_);
if (data.containsKey(pk)) data.remove(pk);
}