store deps as a cached function