added caching of dependencies