fix dependency computation and caching
fix caching and dependencies; change cache format