smarter and simpler dep caching