Stores the retrieved template in $templateCache