Fixes #4304 - RABL cache collision for variants

This uses the template path to ensure unique cache keys and guarantees no collisions. Could have also used a string, this is a more generic solution.