public function findFilename($name) {
     	$logicalName = (string) $name;
     	if(isset($this->cache[$logicalName])) {
     		return $this->cache[$logicalName];
     	}

     	try {
     		$template = $this->parser->parse($name);
     		$file = $this->locator->locate($template);
     	} catch (\Exception $e) {
     		throw new \InvalidArgumentException(sprintf('Unable to find template "%s".', $logicalName));
     	}

     	return $this->cache[$logicalName] = $file;
     }