public function createView(ExpressViewRenderer $renderer, $resource)
	{
		$resource = (string)$resource;
		
		if(!is_file($resource))
		{
			throw new \RuntimeException(sprintf('Express view not found: "%s"', $resource));
		}
		
		$key = $this->createKey($resource);
		$typeName = $this->createTypeName($resource);
		
		if(class_exists($typeName, false))
		{
			return $typeName;
		}
		
		$file = $this->cachePath . '/' . $key . '.php';

		if(!is_file($file) || filemtime($file) < filemtime($resource))
		{
			$time = microtime(true);
			
			try
			{
				$code = $this->parseView($renderer, file_get_contents($resource), $resource)->generateCode($key);
			}
			catch(\Exception $e)
			{
				throw new \RuntimeException(sprintf('Unable to parse express view "%s"', $resource), 0, $e);
			}
			
			Filesystem::writeFile($file, $code);
			
			$diff = sprintf('%.2f', microtime(true) - $time);
			
			if($this->logger)
			{
				$this->logger->info('Compiled express view {view}, time spent {time} seconds', ['view' => $resource, 'time' => $diff]);
			}
		}
		
		require_once $file;
		
		if(!class_exists($typeName, false))
		{
			throw new \RuntimeException(sprintf('Unable to load compiled express view "%s"', $resource));
		}
		
		return $typeName;
	}