refactored watcher; produces logs

This commit is contained in:
Tim Olson
2023-09-01 18:58:04 -04:00
parent 97234c955f
commit 2e1d2aaa96
9 changed files with 238 additions and 68 deletions

19
cache.js Normal file
View File

@@ -0,0 +1,19 @@
// implement a cluster-wide cache which is in-memory for each instance
export class Cache {
constructor(name) {
this.name = name
this.cache = {}
}
async get(key) {
return this.cache[key]
}
async set(key, value) {
this.cache[key] = value
// todo broadcast
}
}