fastpack/fastpack

Provide better reporting on cache usage

zindel opened this issue · 1 comments

So far we have several states considering cache on startup:

  1. cache file does not exist at startup time (Current message: "Cache: no")
  2. cache file exists at startup time and loaded (Current message: "Cache: yes")
  3. --no-cache option is provided, in this case existence of the cache file is ignored (Current message: "Cache: no")
  4. Finally, if the --watch flag is set, the first run would report the cache usage according to the rules above, but all the subsequent runs would say "Cache: yes", since in-memory cache is always used in the watch mode.

Proposal (numbers match the cases above):

  1. "Cache: no"
  2. "Cache: yes"
  3. "Cache: disabled"
  4. No message at all for all runs except of the first.

CC @rauanmayemir

There's an alternate option for case 1 to write "Cache: empty". Otherwise, this looks good to me.