Calculate cache key for all associated models