I am working on a small experimental freshness-first caching library and wanted some design feedback. before i take it further.
Instead of wiring up invalidations by hand, the cache would watch your function by hand and cache should automatically infer the behavior and keep the data fresh.