Caching main dependencies into a global variable.