open-simulation-platform/cosim-cli

Use a persistent FMU cache

Closed this issue · 1 comments

To avoid having to unzip the same FMUs over and over again, CSE CLI should use cse::fmi::importer with a persistent cache directory. A clean-cache subcommand should also be added.

I propose to use $HOME/.cse/fmu-cache on Linux and %LOCALAPPDATA%\CSE\fmu-cache on Windows. (These could be shared by other CSE applications too.)

Further investigation suggest that a cse directory located under one of the following would be more appropriate:

  • *NIX systems (except OS X): $XDG_CACHE_HOME, defaulting to $HOME/.cache (source)
  • Windows: %LocalAppData%, defaulting to %UserProfile%/AppData/Local (source)
  • OS X: $HOME/Library/Caches (source)