add --rebuild-cache cmdline option and extend docs