separate parsing and caching of the cached module

similar to how we already separate the parsing and caching of the
extensions and the modules.