Fixes #4304 - RABL cache collision for variants

This uses string prefixes within each variant template to ensure unique cache keys and guarantees no collisions.