Add multipurpose cache support

This commit is contained in:
crschnick 2023-09-07 16:42:52 +00:00
parent c19774e141
commit f382f30476

View file

@ -13,12 +13,22 @@ public class OpenFileSystemCache {
private final OpenFileSystemModel model;
private final Map<String, Boolean> installedApplications = new HashMap<>();
private final Map<String, Object> multiPurposeCache = new HashMap<>();
private String username;
public OpenFileSystemCache(OpenFileSystemModel model) {
this.model = model;
}
@SuppressWarnings("unchecked")
public <T> T get(String key) {
return (T) multiPurposeCache.get(key);
}
public void set(String key, Object value) {
multiPurposeCache.put(key, value);
}
public void init() throws Exception {
ShellControl sc = model.getFileSystem().getShell().get();
ShellDialect d = sc.getShellDialect();