Caching weights.