iay/mdq-server

remove stale rendered results

Opened this issue · 0 comments

iay commented

The new cache system in #18 will replace old rendered results when they are queried for and the generation match, but there are a couple of situations where this will not happen:

  • an entity is referenced and then disappears from the source
  • an entity is referenced and then not queried for again

In each of these cases, the rendered result will be retained indefinitely. This probably isn't a major issue but it would make sense to sweep the cache from time to time to remove stale entries.

An alternative would be some kind of positive invalidation signal from the lower layers, or an assumption that once the generation had changed on any result then all cached results should be discarded.