Fixes #19320: Ability to leverage cache key generation for cache templatetag

Commit that fixes ticket #19320 - as outlined in https://code.djangoproject.com/ticket/19320#comment:1