2👍
It may not be the answer you were looking for but it looks like there isn’t an alternative.
From the deprecation ticket:
The current implementation of
cache_choices
is pretty useless as it does not share between multiple forms, only between multiple renderings of the same form object. This is because of how we copy fields when moving fromform.base_fields
toform.fields
. As such,cache_choices
as is should be removed.
So unless you were rendering the same form object multiple times, it looks as though it might not have been doing what you wanted anyway.
Source:stackexchange.com