Open
Description
As a follow-up of a discussion on the modules-interest mailing-list, cachebuild process takes infinite time and memory when a modulepath contains a very large amount of non-modulefiles (millions).
This is due to the recording in the cache of invalid modulefiles with their path and the error message obtained when checking if these files are modulefiles.
It may be simpler to avoid recording such information in the cache and treat access to these non-modulefiles as a file not found error.