linnarsson-lab / loom-viewer

Tool for sharing, browsing and visualizing single-cell data stored in the Loom file format
BSD 2-Clause "Simplified" License
35 stars 6 forks source link

Automatically remove server cache for non-existing loom-files #157

Open JobLeonard opened 6 years ago

JobLeonard commented 6 years ago

Split from #156. To quote the reasoning there:

When iterating over a project folder, it might be prudent to delete any extracted metadata without a matching loom file.

  • ✔️ pro: automatically cleans up stale cache
  • ✔️ pro: avoids issue of renaming a loom file, later replacing it with another loom file, and the new loom file being stuck with old stale cache
  • ❌ con: does not prevent previous when immediately replacing a loom file.
    • ✔️ Counterargument: this is the kind of "expert mode" renaming where one should realise the cache needs to be updated.
      • Add to documentation?
  • ❌ con: when debugging, I sometimes rename metadata to a backup, then change code, then refresh to see if changes in code reflect changes to cache.
    • ✔️ Counterargument: specific niche debugging scenario,
    • ✔️ Counterargument: different renaming scheme (FILENAME.loom.old_file_md_1.json.gzip instead of FILENAME_old1.loom.file_md.json.gzip) fixes this.
    • ✔️ Counterargument: as an alternate workaround, not auto-cleaning in debug mode will avoid this issue (and is likely useful for debugging anyway)

Verdict: should be implemented