// f is a function or an instance of Cache
sclass DependentCache extends Cache {
O f, lastValue;
*() {}
*(O *maker, O *f) {}
A get() {
lock lock;
O value;
if (f instanceof Cache) value = f/Cache.changeCount;
else value = callF(f);
if (value != lastValue) {
clear();
value = lastValue;
}
ret super.get();
}
}