OpenImaging/miqa

Robust file cache

annehaley opened this issue · 1 comments

I think this merits adding a cache abstraction, i.e. functions to mediate adding to the cache that internally handle eviction, rather than direct access to the underlying data structure.

Originally posted by @zachmullen in #597 (comment)

See above PR for details on what further action is needed.

The most important aspect of this is making sure we do cache eviction of previously viewed images. We should only keep the m most recently viewed frames, and only prefetch the next n frames in the default order. Cache entries will need to also contain a flag indicating whether they are fully loaded, or pending.