implement invalidating dependency cache