deps-cache
Invalidate caches with dependency graph
Example
var Handle = var cache = {}var h = cacheh // `a` depends on `c`h // `b` depends on both `c` and `d` h // `c` is invalidatedconsole// { d: 4 } h // `d` is invalidatedconsole// { a: 1, c: 3 } { cachea = 1 cacheb = 2 cachec = 3 cached = 4}
API
h.add(key, deps)
Add dependencies.
h.invalidate(keys)
Invalidate keys.