[1.5.x] Tweaked cache key creation to avoid strict typing.
[1.5.x] Tweaked cache key creation to avoid strict typing.

This is a provisional change. See #19221 for details.

Backport of 6c69de8 from master.

alx-eu/django,hasadna/django,hasadna/django,imtapps/django-imt-fork,bliti/django-nonrel-1.5,hasadna/django,ccn-2m/django,bliti/django-nonrel-1.5,bliti/django-nonrel-1.5,imtapps/django-imt-fork,ccn-2m/django,ccn-2m/django,imtapps/django-imt-fork,alx-eu/django,alx-eu/django,ccn-2m/django,alx-eu/django