Get cache working better, track dependencies from json