cache candidate profiles

unify cache update code