Add assignment weights to cache keys.

Closes #659.