mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Add multipurpose cache support
This commit is contained in:
parent
c19774e141
commit
f382f30476
1 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue